Date Range Problem Between Access 2003 and 2007.

Sinfathisar

Registered User.
Local time
Today, 14:56
Joined
Jan 29, 2009
Messages
60
Hello everyone,

I am having a compatibility issue with my database that seems to be stemming from my report queries. I am using Access 2007 and have a database that is saved in 2000 compatibility mode. The interface needs to be in both Access 2007 and Access 2003. When I open the 2000 version on a computer with 2003, the reports that run off of parameterized queries with date ranges no longer work correctly. The prompt is asking for an extra date to be entered. This is occurring on reports and subreports.

Here is an example of one of the report queries:

Between [Beginning Date] And [Ending Date]

I haven't been able to find any listings with this type of compatibility issue, and the queries work just fine when I use Access 2007 in compatibility mode. Any help would be much appreciated.

Thanks
~Jen
 
First of all, you really should use a form for input instead of having the queries popup prompts. The reason? Because for one, users don't have to repeat the entry if they mess up, or they choose to run again. It is still there and it doesn't require so much from them. Second, you can ensure that the date passed is formatted correctly. And third, you don't really need to code it into the query. You can open the report with a parameter.

For example:

DoCmd.OpenReport "ReportNameHere", acViewPreview, , "[DateField] Between #" & Forms!YourInputFormName.YourStartDateTextBox & "# And #" & Forms!YourInputFormName.YourEndDateTextBox & "#"

And then you don't have to include the parameters in the queries.
 

Users who are viewing this thread

Back
Top Bottom