MOD2000: Command-Line Error When Opening a Run-Time Database

ID: Q236557


The information in this article applies to:
  • Microsoft Office 2000 Developer
  • Microsoft Access 2000

Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp).


SYMPTOMS

When you try to run a Microsoft Access run-time application, you may receive the following error message:

The command line you used to start Microsoft Access contains an option that Microsoft Access doesn't recognize.

Exit and restart Microsoft Access using valid command-line options.
When you click OK, the message is repeated once. When you click OK again, you receive the following error message:
Can't find the database file '.mdb.'

Make sure you entered the correct file and path name.
When you click OK again, the application quits.


CAUSE

The Access database that you included in the run-time application has a name that has one or more spaces. Spaces cause the path to be rendered incorrectly during the setup process.


RESOLUTION

To prevent this behavior, do not package Access databases that have one or more spaces in their names.

To correct any shortcuts already deployed, follow these steps:

  1. Right-click the Windows taskbar.


  2. On the shortcut menu, click Properties.


  3. In the Taskbar Properties dialog box, click the Start Menu Programs tab, and then click Advanced. Note that Windows Explorer opens.


  4. In Windows Explorer, click the Programs folder.


  5. In the Programs folder, double-click the folder for your run-time application. Note that the shortcut for the application appears.


  6. Click to highlight the shortcut, and on the File menu, click Properties.


  7. Click the Shortcut tab, and in the Target box, type the correct path to Access and to your database, for example:


  8. "C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE" "C:\Program Files\My Northwind\My Northwind.mdb"
  9. Click OK.



MORE INFORMATION

Steps to Reproduce Behavior

  1. Make a copy of the sample database Northwind.mdb, name the copy "My Northwind.mdb" (including the space), and then open the new database.


  2. Press ALT+F11 to switch to the Visual Basic Editor.


  3. On the Add-Ins menu, if the Package and Deployment Wizard is listed, skip to step 7.


  4. On the Add-Ins menu, click Add-In Manager.


  5. In the Available Add-Ins list, click VBA Package and Deployment Wizard.


  6. Under Load Behavior, click to select the Loaded/Unloaded check box, and then click OK.


  7. On the Add-Ins menu, click Package and Deployment Wizard.


  8. On the first screen of the "Package and Deployment" Wizard, click Package.


  9. Accept the default values and click Next until you see the Package and Deployment Wizard - Included Files screen. Click to select the Include Access Runtime check box, and then click Next until the Finish button is available. Click Finish.


  10. Install the resulting application on a clean Windows 95 or 98 computer.


  11. On the taskbar, click Start, point to Programs, point to My Northwind, and then click My Northwind.

    Note that you receive the errors described in the "Symptoms" section. The location of the database in the error message looks similar to the following:


  12. "c:\My Northwind\Office\MSACCESS.EXE" """ $(APPPATH)\My" Northwind.mdb.""

Additional query words: pra run time command line

Keywords : kberrmsg kbdta modPDWizard
Version : :; WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: November 24, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.