I'm trying to perform a DLOOKUP on a SQL file in Access 2013. I'm confused about when you need to use "extra" quotation marks around your where parameters. I have assigned the following statement as the data source of a textbox on a report:
I am using DLookUp because I need to pull information from a second record in my Item file using a field from another record in the same file. BaseItemNum comes from the query that is the data source for the report. Can you help me?
Reply from Alex Hedley:
Are you just getting nothing returned? Check your spelling. Is BaseItemNum a number or a Text Field? If it is text you would need to wrap the value in quotes. " X='y' " => "x=' " & y & " ' "
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 302.