populate form field from table



I have a table (Complaints) which has a ‘state’ field and ‘authority_addr’
and ‘authority-city’ fields in it. I also have a table(AuthTable) with state
and corresponding auth address records. i.e.,

AL 10 main Street Birmingham
MA 20 Blue st Boston

My problem: When I enter the state in the state field of the Complaint form
how do I automatically populate the authority_addr and authority_city based
on the matching state in the AuthTable? I am fairly new to programming.

Thanks for any help. Dean

Jeff Boyce


Easy answer ... you don't!

If you have a table that already holds these values, there are a number of
very good reasons NOT to replicate those values in other tables. Since
Access is a relational database, you can store the ID of the "Authority" row
that holds the information you want connected to the Complaint. Then use a
query to show the address info connected to a Complaint.

(... and there are some circumstances in which it does make sense to
redundantly store values in more than one table, so if you think you have
one of those, post a more complete description. Folks here will be glad to
help if that is the {rare} case...)


Jeff Boyce
Microsoft Office/Access MVP

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