Automating an Archive Procedure

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I have a basic single-table Access DB which is used as a log for a network
device. The log fills up with a new record for each instance.

Obviously the log grows greatly depending on activity.

Every month I manually take the log off-line, copy it, and delete all
entries from the copy that are not for that month, and all entries that are
for that month from the 'current log.

Therefore creating an archive of a months activity and clearing out that
data from the working log.

Is there a way of automating this? There is a field which records
date/time.
 
You can automate almost anything, but it isn't trivial. You need consistency
(specific file paths, dates to run the queries when no one will be in the
database, etc.) . The query to select the previous month's data would be
something like:

Select * From YourTable Where YourDateField Between
DateSerial(Year(Now()),Month(Now())-1,1) And DateSerial(Year(Now()),
Month(Now()), 0)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top