Main Menu Form

This form is the main menu for the Form Wizard. Click on the button that you want additional information on.


Help
Displays help on the current form.


Exit
Exits the Form Wizard.


Form Caption And Name

This form is used to specify the name and caption of the form you are going to build. Click on the field that you want additional information on.


Cancel
Cancels building the current form.  All data entered to this point is lost!


Enter the name for the form you are building.  The name must follow standard VB form naming conventions.


Enter the caption for the form you are building.


Sample Form Template


Template Field 2
This control should be placed where you want the second data field to be located.  The relative position of the top of this control versus the Fld1 control is used to determine the positioning of data field on the generated form.


Template Field 1


Template Data Control


Creating a Form Template File
Creating A Form Template

You create a VB form template file as you would any other VB form.  The form is used as a template for the form generated with the Form Wizard.  The form should contain the following controls:

Data Control named Data1

This data control must have a database name and recordsource specified.  The values specified do not have to be valid, but must be present.

Label (or other) control named Lbl1

This control is a template (model) for the label control for each field on the form.  The control may be a Label or SSPanel control or any other control that has a Caption property.  This control should be placed where you want the first field label to be located.

Label (or other) control named Lbl2

This control should be placed where you want the second field label to be located.  The relative position of the top of this control versus the Lbl1 control is used to determine the positioning of field labels on the generated form.

Bound Text (or other) control named Fld1

This control is a template (model) for the data field control for each field on the form.  The control may be a Text control or any other bound control.  This control should be placed where you want the first data field to be located.

Bound Text (or other) control named Fld2

This control should be placed where you want the second data field to be located.  The relative position of the top of this control versus the Fld1 control is used to determine the positioning of data field on the generated form.

In addition to the above required controls, you can include any additional controls that you want to include on the form.  For example you could include a status bar, any standard buttons you want on the form, etc.  These control definitions will be copied to the generated form exactly as entered in the template.

You may also include any standard code that you want to include on the form.  Any Subroutines and Routines defined in the template will be copied to the generated form exactly as entered in the template.

Click here to see a sample VB form template file.


VB Form Template File
A VB form that the Form Wizard uses as a template for building the form.


Template Label 1


Template Label 2
This control should be placed where you want the second field label to be located.  The relative position of the top of this control versus the Lbl1 control is used to determine the positioning of field labels on the generated form.


Generated Form


Generated Name Field


Data Control Attributes
Data Control Specification Form

This form allows you to specify the information for the data control on the form you are building.  Click on the field that you want additional information on.


Status Bar
The status bar displays information on the current control, e.g. what should be entered or what function will be performed when the current control is selected.


List of Record Sources
Select the table or query that is to be the RecordSource for the data control.


Find Database Button
Use this button to browse for a database file using the standard Windows file open dialog.  The database selected will be placed in the Database Name field.


Data Control Database Name
Enter the database name for the data control on the form you are building.  This value will be placed in the DatabaseName property of the form you build.


Data Control Name
Enter the name for the data control on the form you are building.  The name must follow VB control naming conventions.


Data Control Caption
Enter the caption for the data control on the form you are building.


Field Changes Cancel Button
Click this button to abandon the changes to the current field.  Previous field changes will remain in effect.


Field Specification Form

This form allows you to specify which fields are to be included on the form you are building.   Click on the field or button you want additional information on.


Fields On The Form
This grid identifies the list of fields to add to the form.  To remove fields from the form select the desired fields and click the Remove button.   You can select multiple fields by pressing the Shift key while clicking on the last field to be selected or while dragging over the fields to be selected.

To change the field label or to place fields on the same line select the fields to change and do a right click.


Field List
This is a list of the fields in the record source selected on the previous screen.  Select one or more fields from the list to add to the form and then click the Add button.  You can select multiple fields by pressing the Shift key while clicking on the last field to be selected or while dragging over the fields to be selected.


Remove Fields Button
Click this button to remove the fields selected in the list to the right (fields on the form) from the form.


Click this button to add the fields selected in the list to the left to the form (the list on the right).


Generate Form
Form Generation Dialog

This form allows you to specify the name of the VB form template file and the name of the form file to generate.  You can then generate the form file.  Click on the field or button that you want additional information on.


Template File Name
Enter the name of the VB form template file.  This is a  VB form that is set up to be a template for the Form Wizard.  You can also use the file drawer to the right to browse for the file.

Click here to get information about creating a VB form template file.


Browse For Form Template
Click this button to browse for a VB form template file using the standard Windows file open dialog.


Generate Form Button
Clicking this button will generate the form specified using the VB form template file and the information from the previous dialogs.  To use the generated form use the VB File Add File function and select the generated form file.


Form Name
Enter the file name for the form that you want the Form Wizard to build.  The Form Wizard will build a text format form file using the information specified in this and the previous dialogs.  The file name should end in .FRM.  You can also use the file drawer at the right to browse for a form file.


Find Form Browse Button
Click on this button to browse for a form file using the standard Windows file save dialog.  The file name selected will be placed in the form name field.


Change Field Form
Field Attribute Change Form

This form allows to change the label for a field and indicate that a field should be placed on the same line as the previous field.  Click on the field or button that you want more information on.


Field Changes OK Button
Click this button to make the changes for the field.  The next field will be displayed if multiple fields were selected.


Same Line Checkbox
Check this box if the field should be placed on the same line as the previous field.  The Form Wizard will place this field, and it's label, to the right of the previous field.  No checking is done to insure that the field and label will fit on the form.


Field Label
Enter the label on the form for this field.  This value will be placed in the Caption property of the label control for the field.


Field Name
This field contains the field name.  It can not be changed.


Table Of Contents

The Form Wizard allows you to automatically build a data aware form using a template you supply.  Click on the blue dot associated with the topic you want more information on.

Main Menu Form - building a form

Creating a VB Form Template File

Sample VB Form Template File

Sample Generated Form

Known Limitations, Etc.

How To Contact Me


Known Limitations

This version is an initial version that has undergone limited testing.  I am sure it is possible to "break" it or make it malfunction if things are not done as expected or the expected input is not received.  Below is a list of known limitations,  problems, or areas that have not been tested extensively.  Many of these will be addressed in future versions.  If you find problems, please inform me as indicated below.

Limited input validation

Limited validation of template form

Template formats not tested

How to notify me of errors


Limited Input Validation

There currently is limited input validation.  Particularly in the area of varifying that all required data control and field data is present.  It is probably very possible to create an invalid form or encounter other problems if the required data is not present.


Template Validation

There is currently very limited validation of the form template.  If required fields are missing it is probably very possible to build an invalid form or at least a form that doesn't do you much good.

Reference the help section on building the form template for details on what is needed in the form template.


Template Formats Not Tested

I have not tested very many variations of form templates.  Basically I have tested for templates with Label controls for label fields and Text box  controls for data fields.  I believe the technique used should work for any type of control, but I haven't verified that.

I have not tested using label and data field controls within other controls.  I believe it should work, however the indentation of the definition created may not be as expected.

I have not tested using the same line feature with any format other than the label located to the left of the data field.  Using other orientations of the label to the data field may result in the labels and/or the data fields being located in incorrect locations.  You can always position the controls after you Add the form into a project.


How To Notify Me
How To Contact Me

To contact me to ask questions regarding the program, report errors, suggest enhancements, etc. address your message to CompuServe Id 70042,1001.  I would also be interested in knowing what you think of the viability of selling a shareware version (with enhancements) of this program.

It is probably best to send me a public message in the forum where you downloaded the program from, that way others will see the information about errors that you may find.  I frequent the VBPJFORUM Beginner's Section (1) and Database Warehouse Section (12) on a regular basis.  I also frequent the MSBASIC Data Objects, Data Control and Programming Issues sections (the names and/or numbers of these sections may be changing soon).