Using dlookup to populate fields

M

Mike Lang

I'm trying to tidy up a Kitchen Installation Management system. Currently, I
have a form which uses a dlookup on a suburb to populate the form with the
state and postcode. The trouble is that each time I move to a new record,
the dlookup happens. Also the dlookup doesn't update the table's fields for
state and postcode - it only does it visually on the form.

What is the best way of having the form lookup the state and postcode from
the suburb ONCE on exiting the suburb field and then populating the fields
for state and postcode in that client record?

I can possibly use the same method for updating a sales tax field which I am
currently having problems with.

Thanks

Mike
 
T

Tom Lake

Mike Lang said:
I'm trying to tidy up a Kitchen Installation Management system. Currently,
I have a form which uses a dlookup on a suburb to populate the form with
the state and postcode. The trouble is that each time I move to a new
record, the dlookup happens. Also the dlookup doesn't update the table's
fields for state and postcode - it only does it visually on the form.

If the suburb is sufficient to determine the state and postcode, you
shouldn't
be storing those in the table anyway. I'd create a query with your main
table
and the state/postcode table and base the form on that query. It's faster
than
using DLookup.

Tom Lake
 
M

Mike Lang

Thanks for the reply Tom,

Unfortunately, the user has to be able to override the State and Postcode in
case there is more than one matching suburb.
Also I thought a query would only work once the whole record had been
updated?

Are there any examples I could play with anywhere that would help me on
this?

Cheers

Mike
 

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

Similar Threads


Top