ACC: How to Run MS Access Wizards Using Visual BasicID: Q148506
|
Advanced: Requires expert coding, interoperability, and multiuser
skills.
This article describes how to start the Microsoft Access 97 and
Microsoft Access 7.0 wizards by using Visual Basic for Applications.
CAUTION: If you plan to create a custom application using the
Microsoft Access Developer's Toolkit (ADT) for Windows 95 or the
Microsoft Office 97 Developers Edition (ODE), you should not
programmatically start the Microsoft Access. Since you cannot
distribute the required library files with your application, any
Visual Basic code that runs the wizards can fail in the run-time
environment. You must have a single, licensed copy of Microsoft
Access for Windows 95 or Microsoft Access 97 installed on your
computer to run the Microsoft Access Wizards by using the methods
described in this article.
In Microsoft Access 97, the procedures for running the Wizards
are contained in the Wzmain80.mde and Wztool80.mde library
databases, which are located in your Microsoft Office folder (for
example, C:\Msoffice\Office).
In Microsoft Access 7.0 for Windows 95, the procedures for
running the Wizards are contained in the Wzmain70.mda and
Wztool70.mda library databases, which are located in your
Microsoft Access folder (for example, C:\Msoffice\Msaccess).
The Wzmain80.mde and Wzmain80.mde library databases contain the
following procedures for specific wizards:
Wizard Procedures
---------------------------------------------------------------------
Form frui_Entry([TableName as String], ObjectType _
Report as Integer)
Simple Query
Crosstab Query xtq_Entry()
AutoForm: Columnar auto_Entry(TableName as String, DocumentType _
AutoForm: Datasheet as Integer, ObjectType as Integer)
AutoForm: Tabular
AutoReport: Columnar
AutoReport: Tabular
PivotTable pvt_Entry([TableName as String])
Word for Windows Merge pm_Entry(TableName as String)
MailingLabel mlbl_Entry(TableName as String)
Table tw_Entry()
Wizard Procedures
------------------------------------------------------------------
Attachment att_Entry()
Form Chart cw_WizardEntry(TableName as String, _
Report Chart ObjectType as Integer, Unused as Integer)
Find Duplicates Query dup_Entry()
Find Unmatched Query dwz_Entry()
Wizard Calling Syntax
---------------------------------------------------------
Attachment =att_Entry()
AutoForm: Columnar =auto_Entry("Customers", 1 , 2 )
AutoForm: Datasheet =auto_Entry("Customers", 3 , 2 )
AutoForm: Tabular =auto_Entry("Customers", 2 , 2 )
AutoReport: Columnar =auto_Entry("Customers", 1 , 3 )
AutoReport: Tabular =auto_Entry("Customers", 2 , 3 )
Crosstab Query =xtq_Entry()
Find Duplicates Query =dup_Entry()
Find Unmatched Query =dwz_Entry()
Simple Query =frui_Entry("Customers",1)
Form =frui_Entry("",2)
Form Chart =cw_WizardEntry("Customers",2,0)
MailingLabel =mlbl_Entry("Customers")
PivotTable =pvt_Entry([TableName as String])
Report =frui_Entry("Customers" ,3)
Report Chart =cw_WizardEntry("Customers",3,0)
Table =tw_Entry()
Word for Windows Merge =pm_Entry("Customers")
Application.Run "<library>.<function>", [arguments]
Wizard "<library>.<function>"
-----------------------------------------------------------------------
Attachment "Wztool80.att_Entry"
AutoForm: Columnar "Wzmain80.auto_Entry", "Customers",1,acForm
AutoForm: Datasheet "Wzmain80.auto_Entry", "Customers",3,acForm
AutoForm: Tabular "Wzmain80.auto_Entry", "Customers",2,acForm
AutoReport: Columnar "Wzmain80.auto_Entry", "Customers",1,acReport
AutoReport: Tabular "Wzmain80.auto_Entry", "Customers",2,acReport
Crosstab Query "Wzmain80.xtq_Entry"
Find Duplicates Query "Wztool80.dup_Entry"
Find Unmatched Query "Wztool80.dwz_Entry"
Simple Query "Wzmain80.frui_Entry", "Customers",acQuery
Form "Wzmain80.frui_Entry", "",acForm
Form Chart "Wztool80.cw_WizardEntry", "Customers",acForm,0
MailingLabel "Wzmain80.mlbl_Entry", "Customers"
PivotTable "Wzmain80.pvt_Entry","Customers"
Report "Wzmain80.frui_Entry", "Customers" ,acReport
Report Chart "Wztool80.cw_WizardEntry", "Customers",acReport,0
Table "Wzmain80.tw_Entry"
Word for Windows Merge "Wzmain80.pm_Entry", "Customers"
Microsoft Access "Building Applications with Microsoft Access 97," Chapter
12, "Using Library Databases and Dynamic-Link Libraries," pages 353-369.
Microsoft Access "Building Applications with Microsoft Access for Windows
95," version 7.0, Chapter 12, "Using Library Databases and Dynamic-Link
Libraries," pages 292-294.
For more information about starting Microsoft Wizards in Microsoft Access
version 2.0, please see the following article in the Microsoft Knowledge
Base:
Q115121 ACC2: How to Start MS Access Wizards with WLib_WizMain
Function
Keywords : kbusage WzHowto
Version : 7.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 20, 1999