ACC1x: Practice Using Object Analyzer CommandsID: Q88651
|
This article provides an example of how to use the Object Analyzer
commands discussed in the article titled "Programming with the Object
Analyzer Engine and Utilities."
This article assumes that you are familiar with Access Basic and with
creating Microsoft Access applications using the programming tools
provided with Microsoft Access. For more information on Access Basic,
please refer to the "Introduction to Programming" manual.
As discussed in "Programming with the Object Analyzer Engine and
Utilities," you can take advantage of the Object Analyzer engine by using
the commands in the Object Analyzer module.
To create your own Database Analyzer, follow these steps.
Control Option Value Caption
--------------------------------------
First Button 1 Table
Second Button 2 Query
Third Button 3 Form
Fourth Button 4 Report
Fifth Button 5 Macro
Sixth Button 6 Module
Function AnalyzeIt (InName As String, InType As Integer)
' This function accepts the name of a Microsoft Access object
' and a number representing what type of object it is, then uses
' the Object Analyzer Dump commands to analyze the object.
DoCmd Hourglass True
Select Case InType
Case 1
DumpTableInfo "NWIND.MDB","@Table",InName,False
Case 2
DumpQueryInfo "NWIND.MDB","@QuerySQL","@Query",InName
Case 3
DumpFormOrReport "NWIND.MDB","@Form","@FCtrls",InName,True
Case 4
DumpFormOrReport "NWIND.MDB","@Report","@RCtrls",InName,False
Case 5
DumpMacroInfo "NWIND.MDB","@Macro",InName
Case 6
DumpModuleInfo "NWIND.MDB","@Procs","@Vars",InName
End Select
DoCmd Hourglass False
End Function
Keywords : kbprg
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 9, 1999