M
ost of the sample databases for earlier chapters included objects
from the Access 2007 Backup database, used to make incremen-
tally numbered database backups. In order to use this feature in a
database, you need to import several objects from Access 2007 Backup.accdb
into the current database, and set a reference to the Microsoft Scripting
Runtime library, which is a nuisance. It would be much more convenient to
just have backup available in all your Access databases, say from a menu
command.
An Access add-in will do just that, encapsulating a set of database objects and
code into a single package that is available to all Access databases. In this
chapter I use as an example an Access add-in (Extras 2007.accda, that includes
an enhanced version of the Backup code (from basBackup in Access 2007
Backup.accdb), with some enhancements: a setup form for specifying the
backup folder; and a set of objects and code that let you print out lists of
tables or queries, and their fields, excluding those with user-specified
prefixes — very handy for when you need to know which fields are in which
tables during database development, or for documenting the database structure.
The sample database for this chapter is Extras 2007.accda.
If you are attempting to install an add-in in Access 2007
running on Windows Vista, you may get the security warning
shown in Figure 14-1. This is probably because you are not running Access
as an administrator. To run Access as an administrator, right-click the
MSACCESS.EXE file in the Office 12 subfolder under the Microsoft Office
folder, and select “Run as administrator,” then open an Access database and
install the add-in. This is not a problem when installing add-ins for Access 2007
running on Windows XP.
CAUTION CAUTION
NOTENOTE
IN THIS CHAPTER
Creating Access menu add-ins
Creating Access wizards
Creating Access property
builders
Special considerations and
troubleshooting for Access
add-ins
Creating Access Add-ins