I have produced a dlookup to grab the telephone number of a contact on a form and it returns the folloing error;
run time error '3075': syntax error (missing operator) in query expression ......
Heres the code;
lookup = DLookup("[contact_tele]", "[contacts]", "[contact_name] = " & user)
I cant see whats wrong with it and have cross checked the help on it.
It looks for the contact telephone number from the contacts table where the contact name is that from the variable called user, It then sets a text box on the form to the value of the lookup variable. The error quotes the actual contact when displaying the message box.
Any help would be great.
run time error '3075': syntax error (missing operator) in query expression ......
Heres the code;
lookup = DLookup("[contact_tele]", "[contacts]", "[contact_name] = " & user)
I cant see whats wrong with it and have cross checked the help on it.
It looks for the contact telephone number from the contacts table where the contact name is that from the variable called user, It then sets a text box on the form to the value of the lookup variable. The error quotes the actual contact when displaying the message box.
Any help would be great.