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 USysReglnfo table, as described in the following list (the syntax is similar for Report wizards):

■ 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 version 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, indicating the start of a new add-in. The ValName and Value fields are blank.

■ 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.

■ 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 Addlns folder.

■ 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\ Form Wizards\Custom Form Wizard

0

HKEY_CURRENT_ACCESS_PROFILE\Wizards\ Form Wizards\Custom Form Wizard

1

Description

Select a form type and color scheme for form background colors and control properties

HKEY_CURRENT_ACCESS_PROFILE\Wizards\ Form Wizards\Custom Form Wizard

1

Library

|ACCDIR\Design Schemes.mda

HKEY_CURRENT_ACCESS_PROFILE\Wizards\ Form Wizards\Custom Form Wizard

1

Function

StartDSWizard

In a menu add-in, the function called from the add-in is preceded by an equals sign; in a wizard add-in, there is no equals sign.

0 0

Post a comment