BUG: Data Form Wizard via Application Wizard Omits ADO Reference

ID: Q193326


The information in this article applies to:


SYMPTOMS

When running an application created using the Application Wizard, you receive the following:

"Compile error: User-defined type not defined"


CAUSE

The Application Wizard allows for the creation of forms via the Data Form Wizard. When a form is created in this manner, a reference to ADO is not added to the project.


RESOLUTION

Add a reference to ADO by selecting References from the Project menu and checking the box next to "Microsoft ActiveX Data Objects 2.0 Library."

This problem can also be avoided by running through the Application Wizard without adding any data forms, then adding data forms by invoking the Data Form Wizard directly from the Add-Ins menu.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Select New Project from the File menu.


  2. In the New Project dialog, select Visual Basic Application Wizard and click OK.


  3. Click the Next button on each page of the Wizard until you reach the page titled "Data Access Forms."


  4. Click the Create New Form button.


The following instructions refer to the Data Form Wizard, which is invoked at step 4 above.
  1. Click the Next button.


  2. Select a database type and click Next.


  3. Enter the requested connection information and click Next.


  4. Select "Grid (Datasheet)" as the Form Layout, select ADO Data Control as the Binding Type, and then click Next.


  5. Select a Record Source and at least one field, and then click Next.


  6. Click the Finish button, and click No when prompted to create another form.


  7. Click the Application Wizard's Finish button.


  8. Attempt to run the created project. The result will be:
    Compile error: User-defined type not defined.
    The workaround is as specified in the RESOLUTION section above.


Additional query words: kbDSupport kbdse kbVBp kbVBp600bug kbAppWizard kbADO


Keywords          : 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: June 2, 1999