BigDave619
Programmer
So I made this DB with a lot of help about 15 years ago and haven't done any programming since. DB has worked great but I just had to make a change and lost an important feature. On the following NZDlookup "KnoxNumber" I had to change to a text property from a number property in the table. Now this little string won't work. I'm sure it has something to do with the " ' " or something like that, but I just can't figure it out. Thank you for any help.
Private Sub Add____AfterUpdate()
Me.Address = Nz(DLookup("Address", "tblActivities", "KnoxNumber = " & [Knox File No.] _
& " And EntityNumber = " & [Ent. #] & "" _
& " And LocationNumber = " & [Add. #] & ""), Null)
Me.Zip_Code = Nz(DLookup("ZipCode", "tblActivities", "KnoxNumber = " & [Knox File No.] _
& " And EntityNumber = " & [Ent. #] & "" _
& " And LocationNumber = " & [Add. #] & ""), Null)
End Sub
Private Sub Add____AfterUpdate()
Me.Address = Nz(DLookup("Address", "tblActivities", "KnoxNumber = " & [Knox File No.] _
& " And EntityNumber = " & [Ent. #] & "" _
& " And LocationNumber = " & [Add. #] & ""), Null)
Me.Zip_Code = Nz(DLookup("ZipCode", "tblActivities", "KnoxNumber = " & [Knox File No.] _
& " And EntityNumber = " & [Ent. #] & "" _
& " And LocationNumber = " & [Add. #] & ""), Null)
End Sub