View Full Version : limit data by year


Mike Hughes
03-25-2003, 06:56 AM
I need suggestions on how to do something:
I have a form, from which the user selects a report. In this case the name is Review Continuances. This report can be run for the entire office (all workers) or the user may select a worker name from a combo box and print only the report with information for that worker.

the user needs the ability to select the year of the report they wish to run. (I hope this doesn’t require me to have several reports rather than only the one?) I want to combine any information prior to 2003 into one selection and the next selection would be 2003 and when 2004 arrives they could select that and so on… until the end of time.

The user selects the report by clicking on a radio button in an option group then selecting print or preview.

Is there some way to accomplish this, in a way where I would not need to go back each year and make changes to the report to view the current year? What changes would I need to make to my form?

Thanks

KevinM
03-25-2003, 09:01 AM
How do you define the 'year of a report'?

Do you have a date value in a table that you can extract the year from and then query from this?

Rob.Mills
03-25-2003, 09:55 AM
If you have a date field you can use for current year

DatePart("yyyy", Date())


For previous years:

<DatePart("yyyy", Date())