DoCmd.Echo method (Access)

Carries out the Echo action in Visual Basic.

Syntax

expression.Echo (EchoOn, StatusBarText)

expression A variable that represents a DoCmd object.

Parameters

Name Required/Optional Data type Description
EchoOn Required Variant Use True to turn echo on and False to turn it off.
StatusBarText Optional Variant A string expression indicating the text that appears in the status bar.

Remarks

If you leave the StatusBarText argument blank, do not 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 if 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 is recommended that you use the existing Echo method of the Application object instead.

Note

The Echo method does not affect the visibility of the ribbon or the availability of ribbon commands.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.