The Echo method of the DoCmd object carries out the Echo action in Visual Basic. For more information on how the action and its arguments work, see the action topic.
Syntax
DoCmd.Echo echoon[, statusbartext]
The Echo method has the following arguments.
Argument | Description |
---|---|
echoon | Use True (–1) to turn echo on and False (0) to turn it off. |
statusbartext | A string expression. |
Remarks
If you leave the statusbartext argument blank, don't use a comma following the echoon argument.
If you turn echo off in Visual Basic, you must turn it back on, or it will remain off, even if the user presses CTRL+BREAK or Visual Basic encounters a breakpoint. You may want to create a macro that turns echo on and then assign that macro to a key combination or a custom menu command. You could then use the key combination or menu command to turn echo on if it has been turned off in Visual Basic.
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.