View Single Post
  #5 (permalink)  
Old May 11th, 2004, 02:43 PM
katsarosj katsarosj is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

In my example, I use a value pulled from a dataset row. That is the value that I evaluate against all of the items in the combobox.

The value for the combobox.items.item(x) is the value displayed in the combobox at that given index of x. So, if at index 2, I have "John Doe" displayed in the combobox, when x = 2, I am comparing "John Doe" against the value that I am looking for.

If it is equal, I know that this is the value I need so I set the SelectedIndex equal to x, then I exit the For loop. Obviously, the values would have to be unique or it would just select the first one it comes to.

Sorry I can't help you with your error, but maybe this explanation will help you out somehow.

J
Reply With Quote
The Following User Says Thank You to katsarosj For This Useful Post:
Ron Howerton (February 22nd, 2013)