ACC97: Compile Error Converting a Module with Line Continuation

ID: Q158925

The information in this article applies to:

SYMPTOMS

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

When you use the underline (_) as a line-continuation character in a Visual Basic code module in Microsoft Access 7.0, and then you convert that database in Microsoft Access 97, you may receive the following error message:

   There were compilation errors during the conversion or enabling of this
   database.

RESOLUTION

After you convert a database in Microsoft Access 97, follow these steps to compile and save all modules, and manually correct any compile errors:

1. Open the converted database in Microsoft Access 97.

2. Open any module in Design view.

3. On the Debug menu, click "Compile and Save All Modules."

4. Correct any compilation error that appears.

5. Repeat steps 3 and 4 until all errors have been corrected.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

1. Start Microsoft Access 7.0 and create a new database.

2. Create a module and type the following procedure exactly as shown:

      Function Test()
         Forms![Form1]![test1] = Forms![Form1]![test1] & _
            ", " & Forms![form1]![test2]
      End Function

3. On the Run menu, click Compile Loaded Modules. Note that Microsoft
   Access 7.0 rewrites the procedure as follows:

      Function Test()
         Forms![Form1]![test1] = Forms! _
            [Form1]![test1] & ", " & Forms![form1]![test2]
      End Function

4. Start Microsoft Access 97 and open the database you created in step 1.

5. In the Convert/Open Database dialog box, click Convert. Note that you

   receive the error message mentioned in the "Symptoms" section.

REFERENCES

For more information about converting a database in Microsoft Access 97, search the Help Index for "converting databases," or ask the Microsoft Access 97 Office Assistant.

For more information about issues related to database conversion and compatibility, read the Acread80.wri file located in your Microsoft Access 97 program directory.

Keywords          : kberrmsg kbprg
Version           : 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbbug

Last Reviewed: November 20, 1998