Object Wizard Section

The Object Wizards sections of the .INI file have three parts. The first is the name that is displayed in the Choose Which Wizard dialog box if more than one Wizard is registered for that object type. The second is the name of the Access Basic procedure that is called when the user chooses that entry. The third parameter is the string that is displayed at the bottom of the Choose Which Wizard dialog box, telling the user more about what the Wizard does. Here are sample of .INI file entries for the four kinds of Object Wizards:


[Table Wizards]
MS Access Table=TW_Entry,{This Wizard Creates Tables}
[Query Wizards]
Find Duplicates Query=dup_Entry,{This Wizard Builds a Query That Finds Duplicate Records}
[Form Wizards]
Main/Subform=zwMainSub,{This Wizard Builds a Main/SubForm}
[Report Wizards]
Mailing Label=zwMailingLabel,{This Wizard Builds a Mailing Label Report}

When the user selects one of these Wizards, Microsoft Access calls the specified Access Basic procedure name. Table and Query Wizards are called with no parameters. Microsoft Access calls the entry functions for Form and Report Wizards in one-string parameter, containing the name of the table or query that the user has chosen as the source object for their form or report. Here's the function declaration for the Main/Subform Wizard:


Function zwMainSub (stTable As String) As Integer

In this case, the stTable contains the name of a table that the Wizard uses as the data source of a new form. Return values from Object Wizards are ignored. The function here declares a return value of type integer simply to avoid the overhead of returning an empty variant, which is the default if no explicit declaration is made.