MarkItZero
Freshman
Hello
I currently have a combo box which is filled with JobNames. JobNames is a column in the table Jobs in my Access Database. JobID is the primary key of that table, it is an autonumber.
The JobName that the user selects from the combo box determines the contents of the next form. This works fine, unless of course two Jobs share the same name.
What I would like to do, is populate the combo box with the JobNames and JobID, however the JobID should be hidden.
Here is the code I use to populate the Combo Box...
Any suggestions?
Thanks!
I currently have a combo box which is filled with JobNames. JobNames is a column in the table Jobs in my Access Database. JobID is the primary key of that table, it is an autonumber.
The JobName that the user selects from the combo box determines the contents of the next form. This works fine, unless of course two Jobs share the same name.
What I would like to do, is populate the combo box with the JobNames and JobID, however the JobID should be hidden.
Here is the code I use to populate the Combo Box...
Code:
'Fill DSJobNames1 Dataset
OleDbDataAdapter1.Fill(DsJobNames1, "Jobs")
'Create Dataview
Dim dm As DataTable = DsJobNames1.Tables("Jobs")
Dim DVCmboJobNames As DataView = New DataView(dm)
'Populate Combo Box
cmboJobNames.DataSource = DVCmboJobNames
cmboJobNames.DisplayMember = "JobName"
Any suggestions?
Thanks!