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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can combo box values be applied from another field?

Status
Not open for further replies.

robert693

Programmer
Jun 20, 2001
40
US
I have a form that is based on a query. The query is based on a two tables, Contact and Survey. There is one more table called Institution. Institution has a primary key, who's value is a number and another field called Name. The primary key of Institution is a foriegn key in Survey table and is included in the query in a field called Inst. In the form I want to have a combo box that will display the values from the Name field from the Institution table but will place the value of the primary key in Institution of the same record of the value chosen by the user, into the field in the query called Inst. I hope this can be done and I do apologize for how confusing this sounds! I want to do this because the user will more easily recognize the value from the Name field in Institution rather than the number value of the primary key.
 
Sure, it can be done. That's the main function of combo boxes. All you need is 2 columns in the box, your id column and your name column. You can hide the id column if you don't want it to be seen. (column width of 0) Just have the bound column property point to the id column.

The easiest way to do this to go through the combo box wizard and let it set up all the properties for you. It will default to this set up.

Maq [americanflag]
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top