List Box Populate fields after selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have one table named "Facilities".
This lists the facility along with address etc.

On my Form, I have a list box that I can
choose the facility.

How do I have the address information
automatically populate, after I choose
the facility?
Tom
 
Tom,
You wouldn't really "save" the address, just display it. The listbox
should select a facility via some unique value, such as FacilityID, and then
the address fields would just "display" the address. All you need to
"capture" is that unique identifier. Al the other ancillary info can be
re-derived from that identifier.
Now, display the address info just refer to the appropriate columns in
the list box. Say the address is in column 3. (listboxes and combos start
numbering at 0, left to right)
An unbound field on the form with a ControlSource of...
= lstYourListBoxName.Column(3)
would always display the address of the selected Facility. And so forth for
your other display fields.
 

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

Back
Top