Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Filter for a Report

Status
Not open for further replies.

rgweatherred

Technical User
Mar 6, 2007
2
US
I have a report that I need to be able to define a date range. I have created a query and used the criteria
Between [Enter Start Date] and [Enter end Date]
but when I run the query the report still pulls all records. What am I missing here? Thanks in advance.
 
Is the parameter query the record source of the report? If you attempt to open the query by itself, do you get prompted?

What is the SQL view of the report's record source?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Yes, I get prompted if I attempt to open the query alone. The query is invoked on Open, set in the Event properties of the report but I don't think it is working correctly.
Here is the SQL from the query.

SELECT Call_Detail.Date
FROM Call_Detail
WHERE (((Call_Detail.Date) Between [Enter Start Date] And [Enter End Date]));

The query, as written, is just supposed to apply a filter for the date and the report will only return the date or range requested.

Thanks for the help.
 
I don't know what you did to get "The query is invoked on Open, set in the Event properties of the report". Do you have some code that you should be sharing with us?

Do you realize that parameter prompts are poor user interface and should be replaced by controls on forms?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top