I have an on change event in a text box that uses dlookup to retrieve some values from a table. Following is the code I used. I am getting the address from the Hotel table where teh job number is p11792.
JobName = DLookup("[strAddress]", "tblHotel", "[strJobNumber]= P11792")
This is the error message I get: Run-time error '2471':
The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'P11792."
The code appears to be correct to me. I have used Dlookup before, with no problem.
I would be greatly apprecitive if anyone can point out the problem.
Thanks,
Greg
JobName = DLookup("[strAddress]", "tblHotel", "[strJobNumber]= P11792")
This is the error message I get: Run-time error '2471':
The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'P11792."
The code appears to be correct to me. I have used Dlookup before, with no problem.
I would be greatly apprecitive if anyone can point out the problem.
Thanks,
Greg