List Box Populate fields after selection

T

Tom

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
 
A

Al Camp

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.
 
Top