Here's my confusion...
I have a form which contains 6 zipcode fields (ie... Zip, PrevZip, EmployerZip, CoZip, CoPrevZip, CoEmployerZip) I can use the code below on one field and it works great...However I can not get it to work on more then one field in the same table... I have even tried making multi zipcode tables... I've changed different things around... I am lost...
Thx in advance...
Don
Private Sub Zip_BeforeUpdate(Cancel As Integer)
City = DLookup("[City]", "tblCounty", "[Zip]= '" & Me!Zip & "'")
State = DLookup("[State]", "tblCounty", "[Zip]= '" & Me!Zip & "'")
End Sub
I have a form which contains 6 zipcode fields (ie... Zip, PrevZip, EmployerZip, CoZip, CoPrevZip, CoEmployerZip) I can use the code below on one field and it works great...However I can not get it to work on more then one field in the same table... I have even tried making multi zipcode tables... I've changed different things around... I am lost...
Thx in advance...
Don
Private Sub Zip_BeforeUpdate(Cancel As Integer)
City = DLookup("[City]", "tblCounty", "[Zip]= '" & Me!Zip & "'")
State = DLookup("[State]", "tblCounty", "[Zip]= '" & Me!Zip & "'")
End Sub