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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Report !!! Hurry ......

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to filter my report by FromDate and ToDate. But I don't know how to do. Please help me if you know!
Ex: I want to see data for Report from 01/01/2001 to 25/01/2001. I don't know how to write this module.
 
Assuming the report is generated by a query...

Open the query in design view and right click on it. Select PARAMETERS and type in FromDate and ToDate in the rows and select Date/Time as their format. Then, in the CRITERIA box of the field you wish to sort by, type:"between [FromDate] and [toDate]" (without the quotes)

Then open the report in design view and right click again on the report. Select SORTING AND GROUPING and choose that same field in which you typed the above expression. Make sure interval is 1. Then choose DAY or MONTH or whichever you wish to group them by in the GROUP ON box. If you increase the interval you will increase the amount of DAYS or MONTHS in each grouping.

Hope this helped ya!
 
Oh after re-reading your post. If you do not wish to group the record in your report by days or months, etc... and just wish to see them all lumped together, skip the GROUPING portion of the above post.
 
Thanks very much! But FromDate and ToDate in my Report is not in Database. They don't save in Database, and they are compared with a Date field in my Database. Do you understand?
 
Exactly.. when you type them in as PARAMETERS in the query. The values are asked when you open the query or report and the data is then filtered by them. It does not save the values in any way. It just compares them to whichever Date Field you prefer by typing the "between [FromDate] and [ToDate]".

Or are you saying you do not have authorization to modify the query or report? In that case, I'm not sure what you can do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top