DOCUMENT:Q193326 29-SEP-1998 [vbwin] TITLE :BUG: Data Form Wizard via Application Wizard Omits ADO Reference PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0 --------------------------------------------------------------------- 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 ====================================================================== Version : WINDOWS:6.0 Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.