Echo


Controls whether the Access interface is repainted.

Syntax

DoCmd.Echo EchoOn[, StatusBarText] 

with the following parameters:

EchoOn

An Integer or Boolean that indicates whether interface repainting is on.

StatusBarText

A String containing the text to appear in the application’s status bar as a result of the method call.

Example

Private Sub Form_Load()   DoCmd.Echo False, "Application loading..."   DoCmd.Hourglass True   ' Load images for opening screen   DoCmd.Echo True, "Screen update turned on..."   DoCmd.Hourglass False End Sub

Comments

  • DoCmd.Echo is a “compatibility” command. It is identical to the Application.Echo method, whose usage is preferred.

  • Typically, the Echo method is called to turn off window repainting in operations that draw or write frequently to the application window, thereby improving the application’s performance and eliminating screen flicker.

  • Since only a call to Echo can turn window repainting back on once it has been turned off, it’s a good idea to create an Autokeys macro that allows window repainting to be turned back on in the event of an error.

  • Functions that produce a user interface, such as the MsgBox or InputBox functions, should not be called when screen repainting has been set off.




Access VBA Programming
Microsoft Access VBA Programming for the Absolute Beginner
ISBN: 1598633937
EAN: 2147483647
Year: 2006
Pages: 214
Authors: Michael Vine

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net