B
Brad Borgeding
I'm getting an error about incorrect use of the listindex property in this
situation.
I have two listboxes on a form. The second one is dependent on the first so
when an item is selected in the first, I do a requery on the second and then
try to select the first item in the second listbox. The code is like this:
listbox2.requery
listbox2.listindex = 0
The error occurs on the statement setting listindex to 0. After the
requery, the second listbox always will have at least one value.
What's the correct way to programatically select an item in a listbox?
Thanks,
Brad
situation.
I have two listboxes on a form. The second one is dependent on the first so
when an item is selected in the first, I do a requery on the second and then
try to select the first item in the second listbox. The code is like this:
listbox2.requery
listbox2.listindex = 0
The error occurs on the statement setting listindex to 0. After the
requery, the second listbox always will have at least one value.
What's the correct way to programatically select an item in a listbox?
Thanks,
Brad