ACC97: Compile Error with Converted Macro with RunSQL Statement (167066)
The information in this article applies to:
This article was previously published under Q167066
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you convert a macro to Visual Basic for Applications code using the
"Save as Visual Basic Module" command, and the macro contains a RunSQL
action that includes a SQL Statement that was copied from a query's SQL
View window, you may receive a compile error when you try to compile the
module.
CAUSE
The RunSQL Statement is not being correctly copied to the module during the
conversion and is causing the module to fail.
RESOLUTION
There are two ways to resolve this problem:
- Edit the SQL Statement Action Argument in the macro and remove the space
character to the left and right of the equal sign (=). Save, close, and
convert the macro again.
- Edit the code in the converted macro module, and remove the extra line.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.
REFERENCES
For more information about using the "Macro to Visual Basic" command,
search the Help Index for "converting macros," and then "converting macros
to Visual Basic," or ask the Microsoft Access 97 Office Assistant.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbbug kbProgramming KB167066 |
---|
|