Access.2007.VBA.Bibl..

(John Hannent) #1

Wizards ..................................................................................................................


My Design Schemes add-in (which finally can be retired because of the superior formatting features
of Access 2007) contains several Form Wizard add-ins.

Form Wizard add-ins need four rows in the USysRegInfo table, as described in the following list
(the syntax is similar for Report wizards):

n In the first row of the add-in, the Subkey field (which is the same for all the add-in’s
rows) has the Registry key information, referencing the Form Wizards section under the
HKEY_CURRENT_ACCESS_PROFILE key (which references the currently running ver-
sion of Access), and ending with the command name to display on the Add-Ins menu,
with an ampersand if desired to make a hot key. The Type field has a value of 0, indicat-
ing the start of a new add-in. The ValName and Value fields are blank.
n In the add-in’s second row, the Type field has a value of 1, the ValName field has the value
“Description”, and the Value field has text to display on the initial wizard screen — in the
case of the Custom Form Wizard, that is the New Form dialog.
n In the add-in’s third row, the Type field has a value of 1, the ValName field has the value
“Library”, and the Value field has the location and name of the library database, using the
|ACCDIR\ placeholder to point to the AddIns folder.
n In the add-in’s fourth row, the Type field has a value of 1, the ValName field has the value
“Function”, and the Value field has the name of the function to run (without an equals sign).

Table 14.4 lists the USysRegInfo rows for the Custom Form Wizard command on the AddIns menu
from the Design Schemes add-in.

TABLE 14.4

USysRegInfo Rows Needed for a Form Wizard Add-in


Subkey Type ValName Value


HKEY_CURRENT_ACCESS_PROFILE\Wizards\ 0
Form Wizards\Custom Form Wizard


HKEY_CURRENT_ACCESS_PROFILE\Wizards\ 1 Description Select a form type and color
Form Wizards\Custom Form Wizard scheme for form background
colors and control properties


HKEY_CURRENT_ACCESS_PROFILE\Wizards\ 1 Library |ACCDIR\Design Schemes.mda
Form Wizards\Custom Form Wizard


HKEY_CURRENT_ACCESS_PROFILE\Wizards\ 1 Function StartDSWizard
Form Wizards\Custom Form Wizard


Creating Access Add-ins 14

Free download pdf