ACC2000: Echo Action Without Any Argument Causes ErrorID: Q209499
|
In Microsoft Access 2000, if you leave the Echo On argument out of the Echo action in a module, you may receive the following error message:
Argument Not Optional.
In earlier versions of Microsoft Access, although the Access Help system stated that the default argument for the Echo action was Yes, you had to include the argument in the line of code in order for the action to run properly. With Access 2000, the Echo method of the DoCmd object has no default argument; the argument must be included.
The Echo method of the DoCmd object was added to provide backward compatibility for running the Echo action in Visual Basic code in Microsoft Access for Windows 95. It's recommended that you use the existing Echo method of the Application object instead.
Option Explicit
'---------------------------------------------------------------
' 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, click Microsoft Access Help on the
Help menu, type "Echo" in the Office Assistant or the Answer Wizard,
and then click Search to view the topic.
Additional query words: prb
Keywords : kberrmsg kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 13, 1999