Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding Combobox

Status
Not open for further replies.

scking

Programmer
Jan 8, 2001
1,263
US
I'm attempting to bind a combobox to store the values in tblProblems.VersionID and display the Version value from the tblVersions. The VersionID field is a foreign key to the ID in tblVersions. Currently I have the combobox displaying the versions in the dropdown which is what I need but when I select a different version it is displayed for every record (apparently not bound to the value of VersionID in tblProblems.

Documentation that I have is confusing and doesn't really address my situation of using the validation table. I routinely use this technique in Microsoft Access but the control binds very differently.

TABLES
--------------
tblProblems.VersionID (1)

tblVersions.ID (1)
tblVersions.Version (1.0.1)

RELATIONSHIPS
-------------
ProblemsVersionIDColumn = DataSet11.Tables("tblProblems").Columns("VersionID")
VersionsKeyColumn = DataSet11.Tables("tblVersions").Columns("ID")
problemsversions = New DataRelation("problemsversions", ProblemsVersionIDColumn, VersionsKeyColumn)
DataSet11.Relations.Add(problemsversions)

COMBOBOX PROPERTIES
---------------------
DataSource tblVersions
DisplayMember - Version
ValueMember - ID

DataBindings.SelectedItem (None)
DataBindings.SelectedValue (None)
DataBindings.Text (DataSet11 - tblProblems.VersionID)
DataBindings.SelectedItem (None)
DataBindings.SelectedValue (None)

Appearance.Text

---------------------
scking@arinc.com
---------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top