Help with ComboBox

Help with ComboBox

Post by John Cosma » Fri, 08 Apr 2005 22:23:21

I'm having trouble populating my combobox using DataSource. I adapted the
code directly out of MSDN, so I'm able to load my data into a dataset, send
it to the combobox and then use the DisplayMember property to specify the
field I want to see. Here is the code.

With Me.ddlMainLookup
.DataSource = gdsTrialWorks.Tables("tsReferencesLookup")
.DisplayMember = "AccountName"
End With

There are about 7 records, which are not NULLs at all. So it surprises me
that nothing comes up in the list, but you can count the number of empty
rows in the combobox list.

Help with ComboBox

Post by Alex Passo » Fri, 08 Apr 2005 22:59:05

You left out ValueMember, I wonder if it is because of that.



Help with ComboBox

Post by Greg Robin » Sat, 09 Apr 2005 00:56:35

missing ValueMember from what I see

Help with ComboBox

Post by John Cosma » Sun, 10 Apr 2005 05:06:45

Thanks, that worked.