Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q236557
Advanced: Requires expert coding, interoperability, and multiuser skills.

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

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Resolution

To resolve this problem, obtain Microsoft Office 2000 Developer Service Release 1 (SR-1).

To obtain SR-1, click the article number below to view the article in the Microsoft Knowledge Base:
253566� MOD2000: How to Obtain and Install Microsoft Office 2000 Developer Service Release 1 (SR-1)
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:
    "C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE" "C:\Program Files\My Northwind\My Northwind.mdb"
  8. Click OK.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. �This problem was corrected in Microsoft Office 2000 Developer SR-1.

↑ Back to the top


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:
    "c:\My Northwind\Office\MSACCESS.EXE" " $(APPPATH)\My" Northwind.mdb."

↑ Back to the top


Keywords: KB236557, kbpending, kbpdwizard, kbbug, kberrmsg

↑ Back to the top

Article Info
Article ID : 236557
Revision : 2
Created on : 7/14/2004
Published on : 7/14/2004
Exists online : False
Views : 423