Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


Use of Dlookup

By TeeKay ·
I have asked about this recently but the answers didn't help so here is more detail.
Two tables and a form in Access 2003, tables "Client" and "Postcodes", form "frmClient".
Client table has two field txtTown_Suburb and txtPostcode. PostCodes table has two fields Town_Suburb and Postcode.
Form has "Town or Suburb" field bound to txtTown_Suburb and "Postcode" field bound to txtPostcode.
I am using:
Private Sub Town_or_Suburb_Exit(Cancel As Integer)
=DLookup("Postcode", "PostCodes", "Criteria = '" & forms!frmClient!txtTown_Suburb & "'")
End Sub
on exit from Town or Suburb to auto-enter the associated postcode.
However I get "Compile error: Syntax error".
I'm just about ready to throw it all in the bin!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums