Previous Year

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a client that is using Access 97, they want to be able to archive some
records, however, I need to make sure that the records that they are
archiving are not from the previous year and I need to code it so that it
will be automatic for each year...


Example:

2005 needs to keep all 2004 and 2005 records
2006 needs to keep all 2005 and 2006 records
and so forth...

What I would like to do is create a command button when clicked will look at
the current date and then make the determination of how far back to go....

Thanks in advance
 
I have a client that is using Access 97, they want to be able to archive some
records, however, I need to make sure that the records that they are
archiving are not from the previous year and I need to code it so that it
will be automatic for each year...

Example:

2005 needs to keep all 2004 and 2005 records
2006 needs to keep all 2005 and 2006 records
and so forth...

What I would like to do is create a command button when clicked will look at
the current date and then make the determination of how far back to go....

Thanks in advance

Where Year(Date()) < Year(Date())-1
 
I have a client that is using Access 97, they want to be able to
archive some records, however, I need to make sure that the records
that they are archiving are not from the previous year and I need to
code it so that it will be automatic for each year...

Archiving records is fine: the best way is to create a field called
"Archived" and set it to true for the records that have been archived.
Or, if you prefer, you could use a DateTime field and set it to the date
the thing was archived.

You can look at your historic records with a query like "WHERE
Archived=TRUE" or even "WHERE ArchiveDate IS NOT NULL"; and active
records with an opposite criterion. And when you want to combine old ones
and new ones, you don't have to mess about with all this nasty UNION ALL
stuff.

There is no reason to create extra tables when you don't need them; and
it's always asking for trouble to store data in table names.

HTH


Tim F
 
Back
Top