How do I have postcodes and states entered automatically?

I

Ian

I am very new to Access so please forgive my lack of knowledge.
have a table which contains all of the Post Office area codes
localities and states for Australia. My database has tables fo
vendors and buyers, each of which includes fields for Street Address
Locality (Suburb/Town), State and postcode. How can I have Acces
fill in the postcode and state in the appropriate form fields base
on selection of the Locality from a drop down list (which is o
course based on the Post Office table showing each of these)
 
G

Graham

As I understand your question, you want to use the locality field to fill the
state and postcode fields.
My suggestion is that you use the DLookup function to retrieve the data from
the locality/state/postcode table.
This function is well explained in MS Access help. The statements will be
similar to:

strWhere = "[Locality] = " & strLocality

varState = DLookup("[State]", "tblLocalityStatePostcode",strWhere)
varPostcode = DLookup("[Postcode]","tblLocalityStatePostcode",strWhere)
 
I

Ian

Graham, thank you very much for your help. I will let you know when
have this feature working
 

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

Top