Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Data source in a form

Data source in a form

Data source in a form

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?

RE: Data source in a form

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close