Quote:
quote:Originally posted by Bob Hansen
WHERE (((Str(transactions.[Date Request])) Like "*" & "5/31/2004" & "*"))
|
Try not to get into the habit of treating dates like text. MtAlam's original statement is correct using the # delimiter for dates, but I do have one question. What is the purpose of the WHERE 1 = 1 portion of your statement?
Quote:
|
quote:SELECT transactions.ChangeRequest FROM transactions WHERE 1=1 AND transactions.[Date Request] = #5/31/2004# ORDER BY transactions.Status
|
Perhaps you should change that to
Code:
"SELECT transactions.ChangeRequest FROM transactions WHERE transactions.[Date Request] = #5/31/2004# ORDER BY transactions.Status"
And if you're doing this on a form where the date request is on a textbox, then
Code:
"SELECT transactions.ChangeRequest FROM transactions WHERE transactions.[Date Request] = #" & Me.txtDateRequest & "# ORDER BY transactions.Status"
Where you replace Me.txtDateRequest with the real name of your textbox.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division