Microsoft KB Archive/189366

= ACC97: Run-Time Error 429 When Running Code in Run-Time Access =

Article ID: 189366

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q189366



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
You install a Microsoft Access run-time application and when you run code, you receive the following error message:

Run-time error '429':

ActiveX component can't create object



CAUSE
You installed the run-time application on a computer on which Microsoft Access has never been previously installed. This error can occur when the DAO Automation Server license key is unavailable in the system registry and your code contains DAO statements that do not include the Application object, DBEngine. The DAO Automation Server license key is used to verify that the application has authorization to use the server.

This error message can also occur on a computer that has Microsoft Access installed if the following conditions are true:


 * The Data Access Objects (DAO) Object Library, Dao350.dll, was not properly registered when Microsoft Access 97 was installed.

-and-
 * You subsequently used Regsvr32.exe to register Dao350.dll.

When the application calls DAO through Visual Basic for Applications code, the client application, in this case Visual Basic for Applications, does not provide the DAO license key. For example, the following code Set dbs = OpenDatabase(" \ ") would not provide the DAO license key because Access is using Visual Basic for Applications as the application.



RESOLUTION
You can get Microsoft Access to provide its DAO license key by using DBEngine as the application object in the call to DAO. For example, the following code Set dbs = DBEngine.OpenDatabase(" \ ") would provide the DAO license key because Microsoft Access is explicitly referencing DBEngine, the DAO object.

Although you only need to reference the Application object, DBEngine, the first time that you use DAO, it is good programming practice to use the Application object any time that you reference DAO functionality in code.



MORE INFORMATION
This error message does not imply that an ActiveX control is involved. In this case, DAO, an ActiveX component, cannot create an object because the DAO Automation Server cannot be started.

When using the DAO server, there are two ways the DAO license key can be provided for verification:
 * An application, such as Microsoft Access, can place a license key in the registration database during installation.
 * The client application can pass the license key to DAO when the call is made.

