ACC: Echo Action Without Any Argument Causes ErrorID: Q101126
|
Moderate: Requires basic macro, coding, and interoperability skills.
In Microsoft Access 7.0 and 97, if you leave the Echo On argument
out of the Echo action in a module, you may receive the error message,
"Argument Not Optional."
In Microsoft Access 1.x and 2.0, if you leave the Echo On argument
out of the Echo action in a module, you may receive the error message,
"Expected: Expression."
Although the Microsoft Access Help system states that the default argument for the Echo action is Yes, you must include the argument in the line of code in order for the action to run properly.
'---------------------------------------------------------------
' The following function will produce the syntax error mentioned
' in the "Symptoms" section.
'---------------------------------------------------------------
Function Test()
Docmd.Echo ' Note that the arguments are missing.
End Function
'--------------------------------------------------------------
'The following function will produce the syntax error mentioned
'in the "Symptoms" section.
'--------------------------------------------------------------
Function Test()
Docmd Echo ' Note that the arguments are missing.
End Function
For more information about the Echo action, search the Help Index for "Echo," and then "Echo Action," or ask the Microsoft Access 97 Office Assistant.
Keywords : McrArg
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 25, 1999