Application.Echo

Turn screen updating on or off.

Syntax
      Application.Echo(EchoOn, StatusBarText)

Key
   EchoOn      Use True (default) to repaint the screen and False to turn it off.

   StatusBarText
               Text to display in the status bar when repainting is turned on or off.

Complex Visual Basic code will run faster if you turn off screen repainting until the procedure has finished running. Echo Off can also be used to hide changes that the user should not see.

The Echo method does not suppress the display of modal dialog boxes, such as error messages, or pop-up forms, such as property sheets.

When screen repainting is off, the screen won’t show any changes, even if the user presses CTRL+BREAK or Visual Basic encounters a breakpoint. If you try to step through the code, you won’t be able to see progress through the code or any other visual cues, however, the code will continue to execute.

For debugging purposes, you can create a macro that turns repainting on and then assign the macro to a key combination.

Examples

' Open the Patients form minimized.
Application.Echo False
DoCmd.Hourglass True

DoCmd.OpenForm "frmPatients", acNormal
DoCmd.Minimize

Application.Echo True
DoCmd.Hourglass False

“The only thing that helps me pass the time away; is knowing I’ll be back at Echo Beach some day” ~ Martha and the Muffins

Related

Hourglass - Display the hourglass icon
DoCmd.RepaintObject
SetWarnings - Turn system messages on or off.


 
Copyright © 1999-2024 SS64.com
Some rights reserved