Combo Box that links to a table

hooby1

Registered User.
Local time
Today, 13:57
Joined
May 9, 2004
Messages
48
I wonder if you can help. I am trying to make a combo box with peoples ID numbers in which links to a table with that persons details. I have made the combo box with the names in but now trying to link the table to it.
For example: Fred is in the combo box with ID number 1 and the user selects him and wants to see his details about him after clicking continue. The form has autonumber 1 showing Fred's details after clcking this.
Any help
Cheers
John :cool:
 
I think the easiest way to do it is to create a combo box from a query. Add all of your fields in the combo box you want, for example purposes, FredName(combo3), FredPay, FredAddress...Create it on your form. Remember which is in each column. FredPay is column1, FredAddress is column2. On the column widths, make it 1";0";0" so the other columns are hidden. You will need 2 controls on the form aside from the combo box, let's call them Pay and Address. On the combo box AfterUpdate, go to the code builder and enter this code.

Me.Pay = Me.Combo3.column(1)
Me.Address = Me.Combo3.column(2)
 
Cheers

Cheers for that, ill have to try it out
 

Users who are viewing this thread

Back
Top Bottom