Dlookup in form

G

Guest

Hi all

I have a field in a form called Suburb and another called Postcode

I have a Qry called PostcodeFinal, with fields, Suburb, Postcode, SubPost(ConCat of Suburb and Postcode) and Major Por

How do I write the expression to show the Major Port automatically when the user types in a suburb name

I've tried =DLookUp([From Suburb/City],[QryPostcodeFinal]![SubPost], [QryPostcodeFinal]![Postcode]

But it gives #Name

Any ideas? thank

A
 
K

Ken Snell

=DLookUp("Major Port", "PostcodeFinal", "Suburb='" &
[ControlNameIntoWhichUserTypesSuburbName] & "'")

The above assumes that Suburb is a text formatted field.

--
- - - - - - - - - - - - - - - - -
Ken Snell
<MS ACCESS MVP>


Arry said:
Hi all,

I have a field in a form called Suburb and another called Postcode.

I have a Qry called PostcodeFinal, with fields, Suburb, Postcode,
SubPost(ConCat of Suburb and Postcode) and Major Port
How do I write the expression to show the Major Port automatically when
the user types in a suburb name?
I've tried =DLookUp([From Suburb/City],[QryPostcodeFinal]![SubPost],
[QryPostcodeFinal]![Postcode] )
 

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

Display Field 3
Auto update other fields 1
Cascading Combo Disaster 4
Using dlookup to populate fields 2
Question for John Vinson 5
Table/Form Question 3
Extract text out of textbox 2
DLookup? 1

Top