General discussion

Locked

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.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums