Dlookup syntax with dates
Posted on 2011-04-25
Dear experts -
This is probably relatively straightforward, but is driving me nuts...
I have a query and am trying to do a lookup and feed it several criteria... this is what I'm currently using, calling from a report [spm_id] is a field in the report:
=DLookUp("[Vendor_Invoice_query_teamexpense]","sumofamount","[invdate] between #" & [Forms]![Project_Reports1]![txtdatefrom) & "# AND #" & [Forms]![Project_Reports1]![txtdateto] & "# and [srprojmgr_id] = " & [me]![spm_id])
I suspect it has something to do with the use of quotation marks, and I've spent an hour now trying to research, to no avail...
MANY THANKS IN ADVANCE.