Microsoft KB Archive/319253

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

Article ID: 319253

Article Last Modified on 8/11/2004

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q319253



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

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



SYMPTOMS
The Microsoft Access 2002 &quot;Startup command-line options&quot; 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:   Create a module, and then type the following line in the Declarations section if it is not already there: Option Explicit   Type the following procedure: Function ConvDB2002(SourceDb As String, DestDb As String) Application.ConvertAccessProject SourceDb, DestDb, acFileFormatAccess2002 End Function   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(&quot;c:\data\MyAcc97.mdb&quot;, &quot;c:\data\MyAcc2002.mdb&quot;) 

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.

