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

How do I "archive" old data in Access 2007 VBA?

Status
Not open for further replies.

REODB

Vendor
Aug 25, 2008
1
US
I'm creating an access database for a company and have been searching this question for a while now. I've come to the conclusion I probably need a new table for archived data and a do cmd run sql vba code. As well as an Update on top of the Insert of previous field data into the new table. Typical use I might use it for, archiving old addresses or if a crucial date is changed we want to keep the old data in a seperate table.

Thanks in Advance,
Dustin Moore
 

You can have a field in your table(s) like STATUS, and as long as the record is OK you can have 'A' (Active) in the Status field. At the end you can change it to 'Z' (Archived) and you can have some other, like 'N' (New), 'D' (Deleted - handy to just mark record 'deleted' in case you want to un-delete the record), and anything else you want.

You can then (once a month, let's say) run a little app to move all records with 'Z' in STATUS to another table.

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top