Microsoft KB Archive/115121

= ACC2: How to Start MS Access Wizards with WLib_WizMain Function =

Article ID: 115121

Article Last Modified on 7/8/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q115121



Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
You can start Microsoft Access Wizards from controls. This article describes how to start a wizard from a button on a form by calling the WLib_WizMain function.



MORE INFORMATION
The following steps demonstrate how to start a Wizard from a command button on a form:

 Open a new form. Add a command button to the form.  Set the button's OnClick property to:

     =WLib_wizmain("",0)

NOTE: 0 invokes the Table Wizard. You can use 0, or any of the following choices in this example:

      Table Wizard: ("",0) Query Wizard: ("",1) Form Wizard: ("",2) Report Wizard: ("",3)

 View the form in Form view. Click the command button.

You can also start a wizard from a custom toolbar. To do so, see article Q113304 here in the Microsoft Knowledge base. In step 5 of that article, select Miscellaneous instead of Record Navigation, and then select Macro instead of Find Record. Then, use a macro with a RunCode action that runs the function WLib_wizmain("",0).

<div class="references_section">