Autolookup expression example

G

Guest

Hi

I have 2 tables - postcodes and schools, joined in a 1-to-many relationship.
When I enter a school's suburb in the schools table, I want to have the
postcode automatically populate the postcode, where the suburb in the schools
table matches the suburb in the postcodes table.

I understand that I probably need an autolookup (I have tried dlookup but
doesn't seem to work?), but I cannot find any actual autolookup syntax
examples either on the Microsoft website or on Access help.

I would really appreciate a simple autolookup expression example so I can
work out where to go from here.

Cheers

Sarki
 
G

Guest

if you enter a suburb then the dlookup should look like that
dlookup("postcode","postcode table","suburb='" & School Suburb & "'")

but if you have the school name and you want to find the suburb and then the
postcode:
dlookup("postcode","postcode table","suburb='" &
dlookup("postcode","schools","School nam"='" School name & "'") & "'")
 

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