Does DLookup return its result as a string?
I have a query that uses an DLookup expression to return a date from another table, but when I try to sort on the field, it appears to be sorting it as a string rather than as a date. Is there a way to format the field as a date so it sorts properly?
Here's my expression:
DLookup("DateOfEvent","tbl_EventLog","fk_EventID=" & EventID)
This returns the dates okay, but when I sort them in ascending order I get something like this:
4/14/2011
4/20/2011
4/8/2011
I can sort them in descending order and they switch, but they obviously aren't ordering by the date which is what made me think the DLookup was returning the result as a string instead of as a date.
All my date fields are formatted as mm/dd/yyyy as time is not important.
thanks!