How to use command line switch /convert to convert database only into Access 2000 file format

Article translations Article translations
Article ID: 319253 - View products that this article applies to.
This article was previously published under Q319253
This article has been archived. It is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

Expand all | Collapse all

SYMPTOMS

The Microsoft Access 2002 "Startup command-line options" Help topic incorrectly states the following:

Converts a previous-version Access database or Access project to the default file format, renames the new file, and then closes Access. You must specify the source database before you use the /convert option. To view the default file format, click Options on the Tools menu, and then click the Advanced tab.

CAUSE

The /convert switch cannot detect the DefaultDatabaseFormat property. In Access 2002, the switch can convert the database only into Access 2000 file format.

RESOLUTION

If you want to convert a previous version of an Access database into Access 2002 file format, use one of the following methods.

Using the Built-in Access Menus

On the Tools menu, point to Database Utilities, point to Convert Database, and then click To Access 2002 File Format.

Using the ConvertAccessProject Method

The following code converts a previous version of an Access database into Access 2002 file format:
  1. Create a module, and then type the following line in the Declarations section if it is not already there:
    Option Explicit
    						
  2. Type the following procedure:
    Function ConvDB2002(SourceDb As String, DestDb As String)
       Application.ConvertAccessProject SourceDb, DestDb, acFileFormatAccess2002
    End Function
    						
  3. To test this function, type the following line in the Immediate window. Make sure to substitute the correct path and file name for your database. Then, press ENTER:
    ?ConvDB2002("c:\data\MyAcc97.mdb", "c:\data\MyAcc2002.mdb")
    						
For more information about the ConvertAccessProject method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type ConvertAccessProject Method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For additional information about how to convert multiple Access databases, click the article number below to view the article in the Microsoft Knowledge Base:
304318 ACC2002: How to Programmatically Convert Multiple Access Databases

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

To set the DefaultDatabaseFormat property, click Options on the Tools menu, and then click the Advanced tab.

REFERENCES

For more information about command line switches, click Microsoft Access Help on the Help menu, type startup command-line options in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Properties

Article ID: 319253 - Last Review: October 24, 2013 - Revision: 4.1
APPLIES TO
  • Microsoft Access 2002 Standard Edition
Keywords: 
kbnosurvey kbarchive kbhowto kbnofix kbdta kbdocerr KB319253

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com