Backing Up Database Objects

How to back up database objects before making changes to them.

Q:  Jean H. writes:  “I am constantly making changes to forms, reports and other database objects, and sometimes I find that a change doesn’t work, and I need to return to an earlier version.  I do back up my databases, but it would be great if I could quickly back up an individual form or report before making changes to it – is there a way to do this?”

A:  Long ago, I created a macro to do this (as part of the AutoKeys macro group); it creates a backup version of an object, prefixed with either a dash or underscore, depending on which one sorts to the front of the list of objects (the sort order has changed through Access versions).  Here is the Access 2003 version:











Macro Name

Action

Comment

^D

SendKeys

Keystrokes:  %fa{home}+^{right 2}_{end}

Wait:  Yes

Duplicate with underscore in front

 

With this macro in your AutoKeys macro group, just select a database object and press Ctrl-D to open a Save As dialog, prefilled with an underscore and the object name, and waiting for you to type a number at the end, so you can keep multiple backup copies of database objects.  All the backup copies will sort to the top of the list of objects, so you can clean them out from time to time.


Figure A.  Numbering a Copy of a Database Object

Note:  If you are just creating the AutoKeys macro group for the first time, the macros in it won’t work until you close and then reopen the database.

Want More?

Office Watch has the latest news and tips about Microsoft Office.  Delivered once a week.