Microsoft KB Archive/115121

From BetaArchive Wiki
Knowledge Base


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:

  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:

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

Keywords: kbhowto kbui KB115121