Morning,
I've searched through the related threads on this topic but still can't get my date range to work.
I wrote a macro to create the filter and that all works fine. However the filter (or more specifically the WHERE clause) doesn't get the data I know is there.
Previously I typed in:
stDateFilter = "[leadsInfo].[LastUpdate]>=#03/08/2004# AND [leadsInfo].[lastUpdate]<=#31/08/2004#"
Docmd.OpenReport "LeadsWon", acReportPreview, , stdatefilter
This doesn't work. So I tried:
stDateFilter = "[leadsInfo].[LastUpdate] Between #03/08/2004# AND #31/08/2004#"
Docmd.OpenReport "LeadsWon", acReportPreview, , stdatefilter
This doesn't work either. It seems rather odd, as when I've created a query which retrieves the correct data and looked at the WHERE clause in the SQL view, it is identical (although it translates it to mm/dd/yyyy).
Any help would be greatly appreciated
I've searched through the related threads on this topic but still can't get my date range to work.
I wrote a macro to create the filter and that all works fine. However the filter (or more specifically the WHERE clause) doesn't get the data I know is there.
Previously I typed in:
stDateFilter = "[leadsInfo].[LastUpdate]>=#03/08/2004# AND [leadsInfo].[lastUpdate]<=#31/08/2004#"
Docmd.OpenReport "LeadsWon", acReportPreview, , stdatefilter
This doesn't work. So I tried:
stDateFilter = "[leadsInfo].[LastUpdate] Between #03/08/2004# AND #31/08/2004#"
Docmd.OpenReport "LeadsWon", acReportPreview, , stdatefilter
This doesn't work either. It seems rather odd, as when I've created a query which retrieves the correct data and looked at the WHERE clause in the SQL view, it is identical (although it translates it to mm/dd/yyyy).
Any help would be greatly appreciated