Microsoft KB Archive/114851

{|
 * width="100%"|

PRJ4: Using DDEExecute in Project to Open a Access Databas

 * }

Q114851

-

The information in this article applies to:


 * Microsoft Access versions 1.1, 2.0
 * Microsoft Project for Windows, version 4.0

-

SYMPTOMS
When you run a macro from Microsoft Project that uses a DDEExecute command to open a database in Microsoft Access, you may receive an error similar to the following if the proper syntax is not used:

Run-time error '1004':

DDEExecute failed. The command [OPENDATABASE C:\ACCESS\NWIND.MDB] may not be formatted correctly.

The following Microsoft Project macro displays the correct syntax to use with the DDEExecute command to open an Access database:

 DDEInitiate "MSAccess", "System" DDEExecute Command:= "[OPENDATABASE C:\ACCESS\SAMPAPPS\NWIND.MDB]" DDETerminate NOTE: The above path location that is included prior to the filename is not necessary if the Microsoft Access database is located in the startup or working directory for Microsoft Access. Also, if the database filename is spelled incorrectly or is not located in the specified directory, the same error will be generated.

Additional query words: 4.00 DDE

Keywords : kbinterop kbole

Issue type : kbprb

Technology :