How do I auto complete a field in Access relating to another field

A

Anne Boyce

I am currently designing a database and need to put an account code and an
account name in the reports.
At present these are combined in one field, but when running the query from
which the report is generated, the account code and account name have to be
entered in full to generate the report. To save time, I wish to have the
facility (when entering the data initially through a form) to be able to type
in the account code, and have the account name automatically entered into
another field in the data entry form, so that when running a query/generating
a report, the user only needs to enter the account code.
Is this possible?
 
L

Larry Daugherty

There are ways to get it done but your best solution is the one you
don't want to do - create separate fields for the separate data in
your table.

One of the relational rules is that the content of each field be
"atomic". That is, it must represent a single value in a single
domain. The reason for that rule is what you are experiencing right
now. When the data is properly normalized to at least third normal
form you can massage and display it in almost any way.

HTH
 
J

Jae Hood

Hi Anne,
I think a simple solution would be to separate acct code and acct name in
your table, so they each have their own field.
Carry over these fields into your form, and use a combo box to lookup the
account codes in your "account" table. Using the comb box wizard, the 3rd
option "Lookup a record based on my selection" will pull up the record
pertaining to that account code and in turn would fill out your account name
on your form.

The report would then use those 2 fields from your form.
And no input, other then the combo box selection, would be needed from your
users to generate the report.
 
Top