Drop down boxes

L

LG

Is it possible to have drop down box in a form that references another table?
Ex. Form has fields named Agency , Address, City, State, Zip. They type in
Agency in the form and than produces a drop down box from another table that
they click on and it will populate the address, city, state, and zip
automatically in appropriate fields?
Thank you
 
J

John W. Vinson

Is it possible to have drop down box in a form that references another table?
Ex. Form has fields named Agency , Address, City, State, Zip. They type in
Agency in the form and than produces a drop down box from another table that
they click on and it will populate the address, city, state, and zip
automatically in appropriate fields?
Thank you

You could... but you shouldn't!

Storing the address, city, state and zip redundantly in two tables is neither
necessary nor wise. It wastes space, and gives you a problem if you ever need
to edit or correct one of the fields. Store the agency's unique ID in this
table, and link to the Agencies table for the other fields!

You can *display* (not store) the other fields by including them in the combo
box's rowsource query, and putting textboxes on the form with control sources
like

=comboboxname.Column(n)

where n is the zero based index of the field you want to see - e.g. if the zip
is the fifth field use (4).
 

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