Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

General: Run wizards from code

Author(s)
Dev Ashish

    Most of the Access wizards can be invoked from code, provided we have the right reference set.

    This method, of course, applies to all Add-ins as well. The only thing for you to find out is the right entry point function, and if required, understand all arguments that the function may need

THIS IS APPLICABLE ONLY TO RETAIL VERSIONS OF ACCESS AND NOT THE RUNTIME ENVIRONMENT.

    To find out about other functions in the wizards, simply check out the appropriate library in the Object Browser.

    Here're a few very basic examples to get you started.

To save display space, the calling convention just contains the arguments you would pass to Application.Run method. So, for example, to run the CrossTab Query Wizard from code, the call would be

Application.Run "acwzmain.xtq_Entry" 

To call a wizard expecting arguments (like PivotTable Wizard), the call would be:

Application.Run "acwzmain.pvt_Entry", "TableName" 

Note: All ObjectType values referenced in the table are of the Integer type and belong to acObjectType enum.

Please remember that some wizards return a value from the entry functions to let the caller know about the status of the call (complete/cancelled) or to return a value back to the caller. In this case, use a variable:

Dim varVal as Variant
varval = Application.Run( "acwzmain.pvt_Entry", "TableName" )

Calling Convention

Wizard Type

Access 97

Access 2000/2002

Resolve Replication Conflicts wzcnf80.cnf_Entry  
CrossTab Query Wizard wzmain80.xtq_Entry acwzmain.xtq_Entry
Table Wizard wzmain80.tw_Entry acwzmain.tw_Entry
Simple query wizard wzmain80.ssq_Entry acwzmain.ssq_Entry
Switchboard manager wzmain80.sbm_Entry acwzmain.sbm_Entry
Pivot Table wizard wzmain80.pvt_Entry, TableName acwzmain.pvt_Entry, TableName
Publish To The Web Wizard wzmain80.pub_StartWiz  
Mail Merge Wizard wzmain80.pm_entry, TableOrQueryName acwzmain.pm_entry, TableOrQueryName
Label Wizard wzmain80.mlbl_Entry, TableName acwzmain.mlbl_Entry, TableName
Add-in Manager wztool80.wm_Entry acwztool.wm_Entry
Table Analyzer wztool80.zw_NormalizerEntry acwztool.zw_NormalizerEntry
Forms Wizard wzmain80.frui_entry, TableOrQueryName, acForm acwztool.frui_entry, TableOrQueryName, acForm
Query Wizard wzmain80.frui_entry, TableOrQueryName, ObjectType acwztool.frui_entry, TableOrQueryName, acQuery
Reports Wizard wzmain80.frui_entry, TableOrQueryName, ObjectType acwztool.frui_entry, TableOrQueryName, acReport
Unmatched Query Wizard wztool80.dwz_entry acwztool.dwz_entry
Linked Table Manager wztool80.att_Entry acwztool.att_Entry
Chart Wizard wzTool80.cw_wizardentry TableOrQueryName, ObjectType, Unused acwztool.cw_wizardentry TableOrQueryName, ObjectType, Unused
Print Security wzTool80.Doc_printsec acwztool.Doc_printsec
Database Documenter wzTool80.Doc_PrintDatabase acwztool.Doc_PrintDatabase
Get Unique Name of object wzmain80.wlib_stUniqueDocName, InitialName, ObjectType acwzmain.wlib_stUniqueDocName, InitialName, ObjectType

© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer