Autopopulate field from info in table

B

benjaminkmartin

I am going to have a large enumerated list for one of my form's
fields. Based on the choice made in the first field, I want the
second field to auto poulate a number. This number coms from a
separate table that enumerated list comes from. All the choices in
the table are autonumbered, and it is this auto number i want to be
displayed in the second field.

So it looks something like this.

Table
001 : Location A
002 : Location B
003 : Location C
....

Form
Location (Field 1) : (Enumerated List... Location A, Location B,
Location C...)
Location ID (Field 2) : (If location A is chosen, number 001 is
autopopulated....)

Thanks for any advice.
 
D

Damon Heron

I am not sure what an "enumerated list" is... If a combobox, then the
source of the combo could be your table, with the number of columns set to
2, the width 0";1" and in the after update event of the combo box:

me.txtbox1= me.combobox1.column(0)

Be aware that referring to "fields" on a form is not really descriptive of
the control you are using. In my example, I have two controls, a combobox
and a textbox.

Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top