Article ID: 827049
Article Last Modified on 12/18/2003
APPLIES TO
- Microsoft Visual Studio 6.0 Service Pack 5
- Microsoft Visual Basic 6.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Professional Edition
SYMPTOMS
In a Microsoft Visual Basic Standard EXE project, you can use the Data Form Wizard to add a data form that connects to Microsoft Access 2000 or a later version. When you run the Visual Basic Standard EXE project, you may receive the following error message:
RESOLUTION
To resolve this problem, remove the reference to Microsoft ActiveX Data Objects 2.0 Library that the Data Form Wizard added and then add a reference to Microsoft ActiveX Data Objects 2.5 Library or a later version. To do this, follow these steps:
- On the Project menu, click References.
- In the References - Project1 dialog box, click to clear the Microsoft ActiveX Data Objects 2.0 Library check box.
- Click to select the Microsoft ActiveX Data Objects 2.5 Library check box, and then click OK.
Note In this step, you can use Microsoft ActiveX Data Objects 2.5 or a later version, such as Microsoft ActiveX Data Objects 2.6 or Microsoft ActiveX Data Objects 2.7.
- On the Run menu, click Start.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to reproduce the behavior
- In Microsoft Visual Basic 6.0, start a new Standard EXE project.
By default, Form1 is created.
- On the Project menu, click Add Form.
- In the Add Form dialog box, click Visual Basic Data Form Wizard, and then click Open.
- In the Data Form Wizard - Introduction dialog box, click Next.
- In the Data Form Wizard - Database Type dialog box, click Next.
- In the Data Form Wizard - Database dialog box, click Browse.
- In the Access Database dialog box, locate the Northwind.mdb file.
Note The Northwind.mdb file is located in the %Program Files%Microsoft Office\Office10\Samples folder.
- Click the Northwind.mdb file, and then click Open.
- In the Data Form Wizard - Database dialog box, click Next.
- In the Data Form Wizard - Form dialog box, click Next.
- In the Data Form Wizard - Record Source dialog box, click to select Categories in the Record Source box, and then click >>.
- Click Next.
- In the Data Form Wizard - Control Selection dialog box, click Finish.
- On the Run menu, click Start.
You receive the error message that is mentioned in the "Symptoms" section of this article.
REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
171215 HOWTO: Use Data Form Wizard to connect to remote data via DAO
222145 PRB: ADO data control events may generate a compilation error
Keywords: kbdatabinding kbdataenv kbdatabase kbforms kbprb kbwizard kbcompiler KB827049