Help Please!

  • Thread starter Thread starter Floyd forbes
  • Start date Start date
F

Floyd forbes

I have a subform with a control that is base on dates.
I would like to only keep the dates for one year.
If I have a date for 7/6/2003 and the date now is 7/7/2004,
How do I not show 7/6/2003.

Floyd
 
In the form's query criteria you would enter something like...

Date()-365



Rick B


I have a subform with a control that is base on dates.
I would like to only keep the dates for one year.
If I have a date for 7/6/2003 and the date now is 7/7/2004,
How do I not show 7/6/2003.

Floyd
 
I have a subform with a control that is base on dates.
I would like to only keep the dates for one year.
If I have a date for 7/6/2003 and the date now is 7/7/2004,
How do I not show 7/6/2003.

Floyd

Base the Subform on a Query with a criterion of
= DateAdd("yyyy", -1, Date())

to subtract one year from today's date and return only records more
recent than that.

If you want to actually permanently and irrevokably delete all data
prior to that date, you can create an Update query with a criterion of

< DateAdd("yyyy", -1, Date())

and run it. I don't really recommend this unless you KNOW that you
will NEVER need a historical record of the information though!
 
Thank you!

John Vinson said:
Base the Subform on a Query with a criterion of


to subtract one year from today's date and return only records more
recent than that.

If you want to actually permanently and irrevokably delete all data
prior to that date, you can create an Update query with a criterion of

< DateAdd("yyyy", -1, Date())

and run it. I don't really recommend this unless you KNOW that you
will NEVER need a historical record of the information though!
 
Even if you "know" that you will never need the historical
data, I would recommend doing an append or maketable query
to make a copy of the data before you delete it. This way
if what you "know" turns out to be wrong, you can still
retrieve the information.
 
Even if you "know" that you will never need the historical
data, I would recommend doing an append or maketable query
to make a copy of the data before you delete it. This way
if what you "know" turns out to be wrong, you can still
retrieve the information.

<wry grin> In my experience, the boss's boss will send a memo "please
report trends in <fitb> for the past five years". This memo will
arrive at your desk two hours after the expiration of the last backup
prior to when the delete query was run.
 
Back
Top