Troubleshoot converting an Access file

You can convert most previous-version Microsoft Access files to Access 2000 or Access 2002 file format with no difficulty. In some rare cases, however, new features can conflict with existing objects and code.

Troubleshoot converting any previous-version Access database to Access 2000 or Access 2002 file format

I receive a message that there were compilation errors during the conversion or enabling of the database.

When you convert a Microsoft Access version 2.0 database to Access 2000 or Access 2002 file format, the conversion utility converts Access Basic code to Visual Basic for Applications (VBA) code. If any code doesn't successfully compile, you might receive an error message after you have converted the Access database.

In the converted Access database, open a module in Design view and click Compile <Project Name> on the Debug menu. As Access compiles, it stops at any line of code that contains an error. You can then modify the syntax to resolve the compile error.

I receive the message "Out of Memory" or "Can't create any more class modules" when converting a large database.

A file in Microsoft Access 2000 or Access 2002 file format has a limit of 1000 modules, while an Access 97 database has a limit of 1024 modules. The number of modules in a Microsoft Access file  includes forms and reports with the HasModule property set to Yes. To fix this memory problem, reduce the number of objects in your Access database. Consider dividing your application into multiple databases. If you have modules with a large amount of code, consider using library databases to store the code.

I want to see a log of my conversion errors.

If Microsoft Access encounters errors while converting an Access file, you can view a summary of these errors by opening the Conversion Errors table in the new Access file. The Conversion Errors table contains the following columns:

Object Type   The type of database object in which Access encountered an error, or "Database" if Access encountered an error that is not specific to a particular type of object.

Object Name   The name of the object in which Access encountered an error. If Access encounters a compilation error during conversion, however, the name of the module that contains the error is not specified.

Error Description   If necessary, you can press SHIFT+F2 to view the entire description of the error.

I can't convert my Access file by using the Convert Database command.

If you can't successfully convert your Microsoft Access file by pointing to Database Utilities on the Tools menu and then clicking the Convert Database command, use the following procedure.

  1. In Access 2002, click New on the File menu and create a new Access database or Access project.

  2. On the File menu, point to Get External Data and click Import.

  3. In the Import dialog box, select the Access file you want to convert.

  4. In the Import Objects dialog box, select the database objects you want to import. If the new Access file is an Access project that you have connected to a Microsoft SQL Server database, import only the forms, reports, pages, macros, and modules.

Note   When you convert an Access file by using this method, you might have to set references by opening a module in Design view, clicking References on the Tools menu, and selecting the check boxes next to the references that were set in the previous-version Access file.

Name AutoCorrect doesn't work in a converted Access database.

Name AutoCorrect is on by default in databases that were created with Microsoft Access 2000 or later. To enable Name AutoCorrect in a converted Microsoft Access database, do the following:

  1. On the Tools menu, click Options, and then click the General tab.
  2. Select the Track name AutoCorrect info and Perform name AutoCorrect check boxes.

    If you want a log of the changes that Access makes to the database when it repairs naming errors, select the Log name AutoCorrect changes check box as well.

  3. Open each table, query, form, and report in Design view, save it, and close it.

The data in a converted non-English Access database is illegible.

When you convert a Microsoft Access database from Access 97 or earlier to Access 2000 or Access 2002 file format, Access uses the sort order to determine which code page to use when converting the data to Unicode. Access 2000 or later associates the General sort order with the Western European code page. Therefore, if you used the previous-version Access database with a non-English operating system and saved it with the General sort order, use one of the following procedures.

Troubleshoot additional issues when converting an Access version 2.0 database to Access 2000 or Access 2002 file format

Time or date values in my query criteria return different results.

When you convert a Microsoft Access version 2.0 database to Access 2000 or Access 2002 file format, queries that contain criteria based on specific time values in Date/Time fields may return different results than they do in earlier versions. This behavior may also occur if you link tables from a Microsoft Access version 2.0 database to a Access 2000 or Access 2002 database. Only the time portion of Date/Time fields is affected.

Queries that contain criteria specifying dates between 1900 and 1929 may also return different results. For example, a date criteria of #01/01/15# in Microsoft Access 2.0 and 95 represents January 1, 1915; the same date criteria in Microsoft Access 97 or later represents January 1, 2015. To work around this difference, modify the data in your criteria to specify the century ù for example, #01/01/1915#.

My converted Microsoft Access version 2.0 report has different margins.

In a Microsoft Access database that you've converted from Access 2.0 to Access 2000 or Access 2002 file format, you may encounter problems when trying to print or preview a report that has some margins set to 0. When you convert a version 2.0 report, margins are not set to 0; they are instead set to the minimum margin that is valid for the default printer. This is to prevent the report from printing data in the nonprinting region for the printer.

To resolve this problem, reduce the column width, column spacing, or number of columns in the report, so the width of the columns plus the width of the default margins is less than the width of your paper.

My 16-bit API calls do not convert.

If a Microsoft Access version or 2.0 module contains 16-bit API calls, you may receive an error message when you convert the database to Access 2000 or Access 2002 file format. You must change the API Declare statements in the converted database to their 32-bit equivalents.

The following list provides some tips for converting your code.

My custom controls do not convert.

When you convert a Microsoft Access database containing an ActiveX control to Access 2000 or Access 2002 file format, you may receive an error. Access version 2.0 supports 16-bit ActiveX controls, whereas Access 95 or later supports 32-bit ActiveX controls. Access can automatically update a 16-bit control to its 32-bit version only if a 32-bit version exists and is registered on your computer.

I receive an error that a table exceeds the limit of 32 indexes.

If your Microsoft Access version 2.0 database contains a table with 32 or more indexes and relationships combined, you may receive an error when you convert to Access 2000 or Access 2002 file format. To resolve this error, open your database in Access version 2.0 and modify your table design to reduce the number of relationships for the primary key table, or remove some indexes from the foreign key table. Then try to convert again.

I receive an ODBC error when opening a form or report in a converted database.

The message "ODBC û connection to datasourcename failed" occurs when a table in your converted Microsoft Access version 1.x or 2.0 database is linked to an ODBC data source that uses a 16-bit driver manager and driver. Microsoft Access 2002 can open only linked ODBC data sources that use the 32-bit versions of the ODBC Driver Manager (Odbc32.dll) and the appropriate ODBC driver ù for example, the 32-bit version of Microsoft SQL Server ODBC Driver (Sqlsrv32.dll).

To correct this problem, you must create a new, identically-named 32-bit data source name (DSN) for each ODBC data source that is linked to the original Access 1.x or 2.0 database.

  1. In Microsoft Windows Control Panel, double-click Administrative Tools, and then double-click Data Sources (ODBC).
  2. Create the new DSN by entering values identical to the original DSN. For example, for Microsoft SQL Server, you need to define at least Data Source Name and Server, but you may also need to define additional values such as the Database Name.

If you are uncertain what the original name of the DSN was, open the original database in the version of Microsoft Access that it was created with, open the linked table in Design view, and then display the Table Properties sheet. The table's Description property contains the definition for the ODBC connection string. The parameter following DSN= in the connection string is the name of the DSN.

Troubleshoot converting an Access 2000 or Access 2002 database to Access 97

I receive a message that my computer is missing at least one of the Access 97 object libraries.

You can convert code that uses Data Access Objects (DAO) back to Microsoft Access 97, but you may receive a message that your computer is missing at least one of the Access 97 object libraries. Use this procedure to fix the missing references.

  1. Convert the Access 2000 or Access 2002 database to Microsoft Access 97. When you receive a message that your computer is missing at least one of the Access 97 object libraries, click OK.
  2. Open the converted Access database in Microsoft Access 97.
  3. Open a module in the database.
  4. On the Tools menu, click References.
  5. In the Available References box, clear the check boxes next to any missing references.
  6. To set the correct reference, select the check box next to the Microsoft DAO 3.51 Object Library.

Note   Unlike Access 2000 and Access 2002, Access 97 is not designed to work with ActiveX Data Objects (ADO).

An Access 97 file that I converted from a secured Access database in Access 2000 or Access 2002 file format is not secured.

When you convert a Microsoft Access database in Access 2000 or Access 2002 file format back to Access 97, permissions in the new Access 97 database are reset to their defaults because Access 97 can't use a workgroup information file in Access 2000 or Access 2002 file format. You must secure the new database in Access 97.

Import specifications are missing from the Access 97 file I converted from Access 2000 or Access 2002 file format.

Import specifications created and saved in a Microsoft Access file in Access2000 or Access 2002 file format are not created in the Access 97 file. You must recreate the specifications.