G
Guest
Hello!
I'm trying to use DLookup to return a date if it falls within a certain
range and so far it doesn't work. Can someone please tell me what's wrong?
Here's my code:
txtNewDate = DLookup("[Date]", "tbQOL", "[PatientID]='" & TheID & "' AND
[Date] >= " & DateMin & " AND [Date] <= " & DateMax)
It seems to output a value if I take out one of the Date criteria but it
doesn't work when I have to compare it against both DateMin and DateMax.
Thanks in advance.
I'm trying to use DLookup to return a date if it falls within a certain
range and so far it doesn't work. Can someone please tell me what's wrong?
Here's my code:
txtNewDate = DLookup("[Date]", "tbQOL", "[PatientID]='" & TheID & "' AND
[Date] >= " & DateMin & " AND [Date] <= " & DateMax)
It seems to output a value if I take out one of the Date criteria but it
doesn't work when I have to compare it against both DateMin and DateMax.
Thanks in advance.