neeeel
10-11-2010, 08:35 AM
I am running a query in vba where i want to select records by date
I have checked that the relevant date is in the table, but the query is not finding it
Set rec = dbs.OpenRecordset("SELECT * from E0 WHERE E0.Date = #" & "09/05/2010" & "#")
There is definitely a record with the date 09/05/2010, but this query doesnt find it. But if i change the date to 05/05/2010 then it finds the record with 05/05/2010 as date fine. I am really really confused as to whats going on here, any ideas?
I have checked that the relevant date is in the table, but the query is not finding it
Set rec = dbs.OpenRecordset("SELECT * from E0 WHERE E0.Date = #" & "09/05/2010" & "#")
There is definitely a record with the date 09/05/2010, but this query doesnt find it. But if i change the date to 05/05/2010 then it finds the record with 05/05/2010 as date fine. I am really really confused as to whats going on here, any ideas?