Hello all,
I'm new to this site so be kind, I use a form to poulate a table in Access 2000, in the form there is a field to input suburb then another to enter the post code for that suburb. I have a another table with all the suburbs and their post codes so I thought I could use DLookUp to populate the post code field.
I'm using a VB code on enter, like this
Private Sub Postcode_Enter()
Dim varX As Variant
varX = DLookup("[Pcode]", "T_Postcodes", "[Suburb1] = '" & Me![Suburb] & "'"
End Sub
but get a nothing in the postcode field, not getting an error message just no result. any ideas?
Cheers,
Cole
I'm new to this site so be kind, I use a form to poulate a table in Access 2000, in the form there is a field to input suburb then another to enter the post code for that suburb. I have a another table with all the suburbs and their post codes so I thought I could use DLookUp to populate the post code field.
I'm using a VB code on enter, like this
Private Sub Postcode_Enter()
Dim varX As Variant
varX = DLookup("[Pcode]", "T_Postcodes", "[Suburb1] = '" & Me![Suburb] & "'"

End Sub
but get a nothing in the postcode field, not getting an error message just no result. any ideas?
Cheers,
Cole