Dlookup in form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
=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] )
 
Back
Top