Copyright: Build 2.01.00 941021 MIKETU


 Microsoft Access Structure Wizard

Copyright Information

Support Policy

Overview

  About the Structure Wizard

Basic Maintenance

  Installing the Structure Wizard

  Uninstalling the Structure Wizard

Show Me

  Selecting objects

  Setting options and default behaviors

Reference

  Error Codes

  Analyzing Modules


Overview

What is the Structure Wizard?

The Database Structure Wizard is a tool to assist you in documenting and troubleshooting Microsoft Access database applications. It generates tables that detail the organization, structure, and settings of your Microsoft Access database files.

The Database Structure Wizard is an updated and improved version of the Database Analyzer utility included in Microsoft Access version 1.x. It features improved customization and flexibility and takes advantage of many new features found in Microsoft Access version 2.0.

It is important to note that the Database Structure Wizard is not a full-featured reporting tool; sample reports are provided only as examples of how you might organize and present the data collected by the Database Structure Wizard. The wizard's main function is to provide you with raw data about your database files that you can use to create custom reports.

How does the Structure Wizard work?

The Structure Wizard relies heavily on Data Access Object technology introduced in Version 2.0 of Microsoft Access.  With the exception of macros and modules, all analysis functions are performed using DAO.

 The developer tells the Structure Wizard which database objects to analyze.

 The developer tells the Structure Wizard which properties to analyze.  If no selections are made, a default selection of properties is used.

 The developer tells the Structure Wizard where to write the output tables.  If no destination is provided, a default location is used.

 The Structure Wizard goes to work.  It creates the output tables and then fills the tables with the requested information.

 The Structure Wizard reports any errors which were encountered, and then terminates.

At this point, the database developer has all requested information on the organization, structure, and settings of their database file.


How to use the Structure Wizard

  I want to see how to select which database objects get analyzed

  I want to see how to set custom options


Main Form
Selecting which objects to analyze
Click on any item in the picture to get further information

Click in the diagram below to get further information on any item.


Options
Setting custom options
Click on any item in the picture to get further information

  I want to choose which properties are analyzed


Options
Setting custom options
Click on any item in the picture to get further information

  I want to choose which properties are analyzed

Press [image] in the Table Objects, Query Objects, or Form and Report Objects section to see a list of properties for each object type.  You can select which properties will be analyzed from this screen.


Properties Selection
Selecting which properties to analyze


Analyzing Code Modules

  Customizing Hints

The Module Analysis functions store the contents of a module to a temporary file on the fixed drive, and then parse the file to determine the procedure names, arguments, and variables.  These functions assume the following:

  All variables will be explicitly declared using a DIM statement.

Variables not explicitly declared using a DIM statement will not be recognized and will not be reported.

  Variables should be type-defined using an AS clause.

If an AS clause is not used, the Structure Wizard will check for a type-declaration suffix, as shown in the following table.  If a type-declaration suffix is not found, the variable is assumed to be of type Variant.

%	Integer
&	Long
!	Single
#	Double
@	Currency
$	String
<none>	Variant
  Each variable must be declared on a separate line.

The Module Analysis functions will only identify the first variable declaration on a line.

General Guidelines

Code which is to be analyzed by this tool should follow these style guidelines for maximum effectiveness:

DON'T

Dim MyInt, MyString$, MyDatabase as Database

DO

Dim MyInt As Integer
Dim MyString As String
Dim MyDatabase As Database

Customization Hints

The following procedures in the NLY MCR/MOD global code module perform the Module Analysis activities

Procedure	Description
NLYMOD_DumpInfo	Control Procedure; prepares output tables; loops through the list of selected modules, saves module code into a temporary text file and calls NLY_ProcedureDetails to parse the text file
NLY_ProcedureDetails	Parse the temporary text file.  Searches for key phrases which identify Procedure or Variable declarations
This information is provided for users with advanced Access Basic knowledge who wish customize the operation of this tool.  The Structure Wizard tool is an unsupported tool, provided as-is, without any warranties.  Please be aware that Microsoft Product Support Services is not able to provide assistance customizing this tool.


Error Codes

When errors occur, they will be displayed in the Status Information panel.  The errors appear as a letter code followed by a four digit number.

Complete List of Access 2.0 Error Codes

The following buttons will take you to the ACCERROR.HLP help file, which contains a complete listing of all Microsoft Access Error Codes and Messages.

  Listed by Error Number
  Listed by Error Message

The letter code indicates which section of the Structure Wizard reported the problem.

TDEF	TableDef Object Reporting
TCOL	TableDef Column Reporting
TFLD	TableDef
TREL	TableDef Relation Reporting
QDEF	QueryDef Object Reporting
QCOL	QueryDef Column Reporting
MCR	Macro
MOD	Modules
FCTL	Form Controls
RCTL	Report Controls
FPRP	Form Properties
RPRP	Report Properties
The four digit number is the Access error code that was encountered.  A listing of all Microsoft Access error messages is provided in ACCERROR.HLP.

  Listed by Error Number

Known Bugs:

DAO has a known problem  involving the Required property of a Field in a TableDef.  This field is reported false regardless of the value stored in the table definition.  At this time, there is no known workaround for this bug.


 About Microsoft Access Structure Wizard

Microsoft Access Structure Wizard
Copyright 1994, Microsoft Corporation, All Rights Reserved.

Microsoft, MS, MS-DOS, and Microsoft Access are registered trademarks, and Windows and Windows NT are trademarks of Microsoft Corporation in the USA and other countries.  CompuServe is a registered trademark of CompuServe Incorporated, an H&R Block Company.

Microsoft Word was used in the production of this documentation.


Support Policy

The Database Structure Wizard was created by a team of Support Engineers from Microsoft Product Support Services and is provided as an unsupported tool. Microsoft Product Support Services does not provide support for this tool beyond installing it. If you have questions about or problems with the Database Structure Wizard, you are encouraged to post a message in the Microsoft Access forum on CompuServe®. (Type go msaccess to reach the forum.) The Database Structure Wizard team will review all comments and findings posted in the forum.


Tables

Display all unselected table objects in the list of available items.


Queries

Display all unselected query objects in the list of available items.


Forms

Display all unselected form objects in the list of available items.


Reports

Display all unselected report objects in the list of available items.


Macros

Display all unselected macro objects in the list of available items.


Code Modules

Display all unselected global code modules in the list of available items.


Show System Objects

Click this box to enable analysis of system object tables.


Analyze

Press this button to begin the analysis.


Close

Press this button to close the Structure Wizard Window.


List of Available Items

Displays each object which has NOT yet been selected for analysis.  Double-click an item to select the object and place it to the list of selected items.


List of Selected Items

Displays each object which has been selected for analysis.  Double-click an item to deselect the object and return it to the list of available items.


Reset

Press this button to deselect all object.  When you press this button, all items which appear in the selected items list  will be removed and placed back in the list of available items.


double-click

Clicking the mouse button twice quickly.


Select Object, Select All Objects
Select Object
Select All Objects

Moves all available items to the list of selected items.

Moves the highlighted object to the list of selected items.


Unselect Object
Unselect All Objects

Unselects the highlighted object and moves it to the list of available objects.

Unselects all objects.  Press this button to start from scratch.

NOTE:  In order to remove an object, you must first press the object button.  For example, to remove a table from the list of selected items, you must press the table button.  If the table button is not selected, pressing [image] will have no effect.


Help

Activates this help topic.


Select Object, Select All Objects
Select Property
Select All Properties

Selects the object highlighted in the list of available items and moves it to the list of selected items.

Selects all objects in the list of available items, and moves them to the list of selected items.


Unselect Object
Unselect Property
Unselect All Properties

Unselects the highlighted property and moves it to the list of available properties.

Unselects all properties.  Press this button to start from scratch.  When you press this button, no properties will be analyzed.


Close

Press this button to return to the Options panel.


Form and Report Control Properties

Check this box to analyze properties of controls on forms and reports.

Information about form control properties is written to @FORMCONTROLS_databasename
Information about report control properties is written to @REPORTCONTROLS_databasename

NOTE  Select the Form and Report Properties check box to analyze the properties that belong to the form and report objects themselves, rather than the controls.


List of Available Properties

Displays each property which has NOT yet been selected for analysis.  Double-click an item to selects the object and places it to the list of selected properties.


List of Selected Properties
List of Selected Items

Displays each property which has been selected for analysis.  Double-click an item to deselect the property and return it to the list of available properties.


Query Column Properties

Check this box to analyze column properties in stored QueryDefs.

Information about QueryDef column properties is written to @COLUMNDETAILS_databasename


Selected Default Properties
Select Default Properties

Press this button to analyze a default set of properties.  The default properties are those which are most frequently utilized.

  How to change the default properties


Changing the list of default properties

The list of default properties is stored in the NLY_ObjectProperties table, in the WZSTRUC2.MDA database file.  A property is listed as a default property if the Default field is True.  You can change the value in the Default field to customize the default properties to suit your preferences.

 To change the default properties

NOTE: If the WZSTRUC2.MDA database file is currently loaded as a library, you must uninstall the Structure Wizard and restart Microsoft Access.

 Open WZSTRUC2.MDA database file.

 Open the NLY_ObjectProperties table.

For every property that you do want selected when you press the Default button, set the Default field to True.

For every property that you do not want selected when you press the Default button, set the Default field to False.


Installing the Structure Wizard

  Print Instructions

 Follow these steps to install the Structure Wizard

 Insert the WX1050 disk in the appropriate drive.

 Start Microsoft Access and open any database file.

 From the File Menu, choose Add-ins, then from the menu that appears, choose Add-in Manager.

 In the Add in Manager dialog box, choose the Add New button.

 In the Drives box, select the drive containing the WX1050 disk.

 In the File Name box, select WZSTRUC2.MDA (the Database Structure Wizard file) and then choose the OK button.

 Choose the CLOSE button.

 Quit and then restart Microsoft Access.

The Structure Wizard will now be loaded as a library.  The Structure Wizard will be loaded every time you start Microsoft Access, until you uninstall the Structure Wizard.


Uninstalling the Structure Wizard

  Print Instructions

 Follow these steps to uninstall the Structure Wizard

 Start Microsoft Access and open any database file.

 From the File Menu, choose Add-ins, then from the menu that appears, choose Add-in Manager.

 In the Add in Manager dialog box, choose the Add New button.

 In the Available Libraries list, select the Structure Wizard entry

 Choose the Uninstall button.

 Quit and then restart Microsoft Access.

The Structure Wizard will not be loaded as a library.  You will be unable to analyze any database files until you again install the Structure Wizard


Selecting An Object Type

If you are modifying the properties for TableDef or QueryDef objects, the Object Type combo box will be displayed.  Select an object type from the combo box and the properties related to that object type will be displayed in the list boxes below.

 TableDef options

 Table Properties
Properties related to Tables

 Field Properties
Properties related to Fields in a table

 Index Properties
Properties related to Indexes

 Table Relationship Properties
Properties related to Table Relationships

 QueryDef options

 Select Add-in Manager
Properties related to QueryDef objects

 Restart Microsoft Access.
Properties related to Query Parameters objects


Show All Objects

Show Problems Only
Show All Objects

After the Structure Wizard has completed analyzing your database structure, a status panel is displayed showing the status of each object you selected for analysis.

If you have selected many different objects, this display can be quite lengthy.  To make it easier to identify any problem records, you can press the Show All Objects/Show Problems Only button.  This button toggles the display panel to show alternately

 the status of all objects analyzed

 the status of objects which encountered problems during the analysis.

The text on the button will change to show the effect of pressing the button.


Cancel

Press the Cancel button to cancel any changes you have made since this window has been open.  If you cancel, all changes will be undone, and your options will remain as they were before you started making changes.


Form/Report Code Module
Include Form and Report Code Modules

If you check this box, all form and report code modules will be analyzed along with the global code modules.
If you do not check this box, only global code modules will be analyzed.

Form and report code modules use the same options as the global code modules.

 see also

Module Procedures
Module Variables

Analyzing Code Modules


Friendly Output
Use Friendly Names

The Microsoft Jet Database Engine stores many field property settings as numeric codes.  This check box determines how the Structure Wizard reports these settings.

If this check box is selected, the Structure Wizard will convert the numeric codes into friendlier text representations of the property setting.  The Structure Wizard uses the global constants defined by Microsoft Access when reporting these settings.

If this check box is not selected, the Structure Wizard will not perform any conversion and will report the numeric data as it is stored by the Microsoft Jet Database Engine.

NOTE  The conversion process can be quite lengthy, especially if you are analyzing forms and/or reports with many controls.  For example, analyzing every property of every object in the NWIND.MDB sample database takes approximately 30 minutes on a 486/66 machine, and results in a 4Mb database.  It is suggested that you analyze one or two forms as a test to gauge how long the conversion process will take on your database.


Indexes
Index Properties

Select this check box to analyze the properties of any indexes which have been defined in your tables.

Information about index properties is written to @INDEXDETAILS_databasename


Module Variables

Select this check box to report on the variables which are defined in your code modules.

Information about module variables is written to @MODULEVARIABLES_databasename

 see also

Analyzing Code Modules


Default Output Location

The Structure Wizard allows you to specify which database will be suggested when you begin an analysis.  You can specify one of the following locations to write the output tables:

 the database being analyzed
 an Analysis database you specify

 To specify a default output database

 Press the builder button
 Point to any Microsoft Access database file

 To default to the current database

 Press the [image] button
 Press the Cancel button


Form/Report Properties

Select this check box to analyze the properties that belong to the forms or reports objects you have selected.

Information about form properties is written to @FORMPROPERTIES_databasename
Information about report properties is written to @REPORTPROPERTIES_databasename

NOTE  Select the Control Properties check box to analyze the properties that belong to the controls on your forms and reports.


Table Relationships

The Structure Wizard provides three options for analyzing table relationships

  Analyze All table relationships
Report on all defined relationships in your database

  Analyze selected table relationships
Report on defined relationships that involve only the tables you have selected

  Do not analyze table relationships

Information about table relationships is written to @TABLERELATIONSHIPS_databasename


Macro Properties

Select this check box to analyze macro actions.

Information about macro actions is written to @MACRODETAILS_databasename


Query Parameters

Select this check box to report on parameters contained in the QueryDefs selected for analysis.

Information about query parameters is written to @PARAMDETAILS_databasename


SQL Only

If you only want to report the SQL behind a Query, select this button.

Selecting this button unselects the Columns check box, and selects the following properties for analysis:

 SQL
 Name


OK

Saves all changes and closes the window.


Module Procedures

Select this check box to report on the procedures which are defined in your code modules.

Information about module procedures is written to @MODULEPROCEDURES_databasename

 see also

Analyzing Code Modules


Field Properties

Select this check box to analyze the properties of all fields which have been defined in the tables selected for analysis.

Information about field properties is written to @FIELDDETAILS_databasename