ACC2: How to Start MS Access Wizards with WLib_WizMain Function

ID: Q115121


The information in this article applies to:


SUMMARY

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

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:

  1. Open a new form.


  2. Add a command button to the form.


  3. 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) 



  4. 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).


REFERENCES

For an example of how to run Microsoft Access Wizards from Visual Basic in Microsoft Access for Windows 95 version 7.0, please see the following article here in the Microsoft Access Knowledge Base:

Q148506 ACC95: How to Run MS Access Wizards Using Visual Basic


Keywords          : kbui UifOthr 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: April 3, 1999