identical report with new record source

  • Thread starter Thread starter rong
  • Start date Start date
R

rong

I would like to than everyone for their help lately. I've gotten my
report to work fine. The report was based on my records for 2004-05. I
would now like to do the same report for 2005-06.
All my queries are based on one table for 04-05, I would like to change
the table to the 05-06 table and keep everything the same. Is it
possible or do I need to make all new queries?

Thanks ahead of time.

Rong
 
You should not be using a different table for each year. Instead, you
should use the query to limit the date range. For one way to do this, in
query design view click in the Criteria row for a date field, and enter:
Between DateSerial(Year(Date()),1,1) and DateSerial(Year(Date()),12,31)

This is telling the query that you want dates between January 1 and December
31 of the current year. Year(Date()) is the current year. That's because
Date() is the current date, and Year() extracts just the year from that.
The next two numbers are the month and the day.

If you enter as the criteria:
Between [Start Date] and [End Date] you will be prompted for a start date
and end date. You could also select all records from the past twelve
months, or just about any other criteria you may care to use. Whatever you
do, avoid using a separate table for different years.

In answer to your question, you would probably need new queries, since they
would be based on a table with a different name. Maybe you could do that by
adding the new table to the design grid and doing some cutting and pasting,
then removing the old table, but it would be a very bad idea. It's easy to
restrict the records to only those that meet certain criteria. It would be
far less effort than remaking your database every year.
 
Back
Top