-
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
-
positive max integer is 32767
-
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.
-
Combo
We need to see some code really. ListIndex is a Long which has a maximum value of 2,147,483,647.
Cheers,
Paul.
-
From a user-point of view, loading 38000+ records into a combo box is well... nuts.
-
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.