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

Data source in a form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can someone please help,

I have a table which among other things contains an id column, a non-descript integer, and a name column which is of more use.

I want to create an input form that has a pick list of names but actually enters the corresponding id for the name chosen.

Is this possible and if so, how?
 
Add a combo box control to your form. Set its Control Source property to the field where you want to store the ID. (The field must be in the table or query named in the form's Record Source property.)

Next, set the control's Row Source to the name of the table that contains the ID and name columns. Set the Column Count property to 3, and set the Column Widths property to 0;0. This makes the first two columns (id and the nondescript integer) invisible in the list. Because no width is given for the third column, it defaults to taking up the whole width of the list.

That's it! Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top