PDA

Click to See Complete Forum and Search --> : Is my database too large for combobox??


Rebus
Nov 5th, 2000, 12:32 PM
My "comboName.AddItem" statement worked fine with a database of 21888 records. Now with 38801 records I get a run time error 5:

"Some part of the call can't be completed.
·An argument probably exceeds the range of permitted values. For example, the Sin function can only accept values within a certain range. Positive arguments less than 2,147,483,648 are accepted, while 2,147,483,648 generates this error.

Does anyone know a work around?

THANX

makai
Nov 5th, 2000, 04:09 PM
positive max integer is 32767

bar
Nov 7th, 2000, 07:11 AM
Are you using some kind of counter to scroll through the records and then add the item in a specific place in the listbox, because the ListBox.ListIndex uses a Long Integer which has a much higher limit than 32767, just can't remember what it is now. If possible show some code.

paulw
Nov 7th, 2000, 07:43 AM
We need to see some code really. ListIndex is a Long which has a maximum value of 2,147,483,647.

Cheers,

Paul.

monte96
Nov 7th, 2000, 10:28 AM
From a user-point of view, loading 38000+ records into a combo box is well... nuts.

bar
Nov 8th, 2000, 12:14 AM
I'd have to agree with Monte96, I'd rather put a command button next to the text box, which when clicked brings up another form with a datagrid, datacontrol, and search as you type text box. Second form then returns selected value to the first form. Works much quicker than running through 38000+ records in code to add to a combo box.