Flyguy said:
I am having difficulty creating backup db images automatically. I
would like to use a feature I used to use on old mainframes call
"generation data groups" that maintained a specified number of db
(file) iterations automatically. Is there a way to do this or
something like it in Access?
Wow, GDGs! I haven't thought about them for years. There's nothing
built into Access, at least not until Access 2003, that will allow you
to safely back up an open database. I think Access 2003 may have this
capability, at least as a menu option if not accessible via code, but I
haven't installed that version so I'm not sure. The only really safe
way to back up the current database via code is to open some external
"helper" program and pass off control to it. The helper program then
closes the database in the Access instance that called it, backs up the
database, and reopens it in the original instance before quitting.
There are a couple of free versions of such a helper program. Michael
Kaplan's TSI SOON (Shut One, Open New) has a variety of features, though
I haven't used it myself. Maybe you can use it in conjunction with a
little generation-managing code of your own to do what you want. Check
this link:
http://www.trigeminal.com/lang/1033/utility.asp?ItemID=8#8
Also, there's the Compacter add-in available on The Access Web, which I
have used and even modified to serve a slightly different purpose:
http://www.mvps.org/access/modules/mdl0030.htm
I think it would probably be pretty easy to modify that code to create
backups in a GDG-like structure.