How do I have postcodes and states entered automatically?

  • Thread starter Thread starter Ian
  • Start date Start date
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)
 
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)
 
Graham, thank you very much for your help. I will let you know when
have this feature working
 
Back
Top