NekoManu Posted May 29, 2009 Posted May 29, 2009 I'm filling a Combox with values from a database. After that I get the last value from another table and want to position the combobox to the correct value. The questions is how? For Each BadgeItem In frmMainForm.cboBadge.Items If BadgeItem.Badge = myDataRow.Item("Data") Then 'Set correct index, but how? End If Next Quote
iebidan Posted June 4, 2009 Posted June 4, 2009 I'm filling a Combox with values from a database. After that I get the last value from another table and want to position the combobox to the correct value. The questions is how? For Each BadgeItem In frmMainForm.cboBadge.Items If BadgeItem.Badge = myDataRow.Item("Data") Then 'Set correct index, but how? End If Next Try to use SelectedIndex instead of SelectedItem, if the item is the last one, you can select it by counting the items Quote Fat kids are harder to kidnap
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.