|
-
Oct 14th, 2002, 04:26 AM
#1
Thread Starter
Fanatic Member
Bind combobox problemo??
I have populated a combobox with the following:
daCombo.FillSchema(dsCombo, SchemaType.Source, "tblItems")
'fiLLDATASET WITH INFO FROM DATAADAPTOR
daCombo.Fill(dsCombo, "tblItems")
'empty combo box
ComboBox2.Items.Clear()
'fill combobox2
ComboBox2.DataSource = dsCombo.Tables("tblitems")
ComboBox2.DisplayMember = "itemDescription"
ComboBox2.ValueMember = "itemID" *causing probs here
When I run the code I get the following error message:
Additional information: Could not bind to the new display member
Can someone tell me why I cant Add a value member?
I need to store the "itemID" so I can search on my form.
Thanks in Advance
-
Oct 14th, 2002, 04:37 AM
#2
Are "itemDescription" and "itemID" fields in "tblitems"? Are there any spelling mistakes? Everything looks right at a glance.
-
Oct 14th, 2002, 04:46 AM
#3
Thread Starter
Fanatic Member
They are field names and they are not misspelled.
Wierd or what>???
-
Oct 14th, 2002, 04:50 AM
#4
Thread Starter
Fanatic Member
Thanks Edneeis.
I just had a look at my code.
When i changed "itemDescription" and "itemID" to "ItemDescription" and "ItemID" it worked.
I didn't realise it was case sensitive.
-
Oct 14th, 2002, 10:03 AM
#5
I'm glad it was something small. I didn't realize they were case sensitive either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|