|
-
September 3rd, 2008, 07:41 PM
#1
[RESOLVED] Cannot Retreive Value Member of first Item in Combo Box
Hi,
I am trying to program a combo box with the data source properties set via the visual settings option instead of programatically. I have connected the Display Member of the combo box to the Name field of the Table, and the value member to the ID field.
I have written a routine to call the selected value of the combo box by button in a message box to test to see which ID is currently selected. Everything seems to pulling ok, however the first listed item in the combo box is retrieving the second item's ID. And if I choose another item in the list and then choose the first item again, the previous item's ID value is still diaplayed when I test the selectedvalue settings.
I was wondering what I need to in order to retrieve the first item's ID when selected, I have tried adding an empty item, however VB.NET 2005 will not let you do this when the data source properties are set. Thank you for your time. Below is the code created by the visual aid data source properties.
Try
Me.ChurchTableAdapter.Fill(Me.DsNewFamily1.Church)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
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
|