Hello All,
Using access 2003. I have a edit form that users use in a database with a field they want autopopulated. I am using the same concept of the zipcode table lookup on the same form that is working fine. But when I apply the same concept to another field; it's not working. ex Table contains states with regions; Ex txtstate txtregiondesc. I want a field call country to autopopulate based on the states in the table. If the state = sc on the form I want the country field to = northeast because in the table sc=northeast.
I hope I'm making sense. the following is the code I'm using base on the zipcode lookup concept.
Code:
Private Sub txtCONSIGNCTRY_Exit(Cancel As Integer)
Dim txtSTATE As String
txtSTATE = DLookup("txtState", "qryREGIONS", "txtREGIONDESC =[txtCONSIGNCTRY] ")
'If (Not IsNull(txtSTATE)) Then Me![txtCONSIGNSTATE] = txtSTATE
End Sub
where am i going wrong please.