Question lookup table?

Lacy527

New member
Joined
Mar 22, 2010
Messages
1
Programming Experience
Beginner
Last edited by a moderator:
I agree with Arg81 that you should have started your own thread, so I moved your post out. Added a link to the other thread that explains your "same problem".
 
I am having the same probelm as http://www.vbdotnetforums.com/datab.../32828-fill-combobox-using-look-up-table.html but I'm a beginner and I don't quite know how to use it with my tables or where to put the code. My tables look like this:

I have a table "TAData" with field Staff Name, the lookup table is tblStaffName with field StaffName.

Can you help please?

Thanks

Lacy


Read the DW3 link in my signature, section Creating a Simple Data App

You will then know how to connect an app to a db and download data from it. After that, its simply a matter of doing the same thing for your lookup table. To use the lookup table to drive a combobox, where the combo shows a nice string, but communicates a value, you would set the combo up so that it has databindings:
DataSource = the lookup table
DisplayMember = the string to show
ValueMember = the value to use
(DataBindings)\SelectedValue = (the column of the table that is to be updated)

The above 4 things can be found in the Properties grid of the combo. You should set the combobox dropdownstyle to dropdownlist
 
Back
Top