"In Desperate Need of Help" <In Desperate Need of
(e-mail address removed)> wrote in message
I have a table called Attorney Information. On my form I have a field for
the Attorney Name, Atotrney Address, Attorney City, State, Zip Code, and
Contact Person. When I choose an Attorney Name, I need their address , city,
state, zip code, and contact person to automatically fill in with the
corresponding data from the table. How would I do that? I am in desperate
need of help. I am not that familiar with Access, and I don't know what to
do. I appreciate any help "for dummies" anyone may be able to offer.
You should not be copying data from one table to another in this fashion.
You should only store the Primary Key value from the Attorney Information
table in the record you are creating and then use lookup methods to
"retrieve and display" additional fields you want to see in the form or
report that you are building. Having multiple copies of this data is
redundant and violates proper database design.
There are many ways to do this, but a fairly easy and flexible one is to
have your ComboBox for Attorney Name include other hidden columns in its
RowSource for all of the other data from the Attorney Information table
that you want to show. Then you can display those hidden columns in other
controls on your form by using expressions like...
=AttorneyName.Column(1)
=AttorneyName.Column(2)
etc..
Again, the above will not "copy" the data from the Attorney Information
table into your form. It will simply display the data that corresponds to
the selection in the Attorney Name ComboBox. It will change automatically
when you make different selections and as you navigate from one record to
the next so to the user it "feels" the same. The important difference is
if you change a piece of data for an attorney (new address for example),
you won't have to go back and update all of the previously created records.
If you copied the data then you would have to do this or older records
would simply show incorrect data.