Microsoft KB Archive/158925

= ACC97: Compile Error Converting a Module with Line Continuation =

Article ID: 158925

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q158925



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



SYMPTOMS
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.



Steps to Reproduce Problem
 Start Microsoft Access 7.0 and create a new database.  Create a module and type the following procedure exactly as shown: Function Test Forms![Form1]![test1] = Forms![Form1]![test1] & _ ", " & Forms![form1]![test2] End Function   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  Start Microsoft Access 97 and open the database you created in step 1. In the Convert/Open Database dialog box, click Convert. Note that you receive the error message mentioned in the "Symptoms" section.</li></ol>

<div class="references_section">