How to disable screen updates during a procedure

E

E. Jordan

I have a form that actively updates background queries via
executing modules "ON CHANGE" for certain parameters.

I began with macros and converted to visual basic to speed
things up, though I know essentially nothing about VBA.

I wish to disable screen refreshes while the scripts
execute, as they open and close several queries, which
results in a lot of flickering and on-screen activity.

If anyone can provide me with VBA scripting that I can
insert at the beginning and end of each module (or a
suggestion of a more efficient means of accomplishing
this), I would greatly appreciate it. Thanks in advance!
 
J

John Vinson

I wish to disable screen refreshes while the scripts
execute, as they open and close several queries, which
results in a lot of flickering and on-screen activity.

Put a line before you start tweaking:

Application.Echo False

and be sure to put

Application.Echo True

when you're done (or the screen will freeze waiting for you).
If anyone can provide me with VBA scripting that I can
insert at the beginning and end of each module (or a
suggestion of a more efficient means of accomplishing
this), I would greatly appreciate it.

If you'ld care to post your code, someone might be able to suggest a
simpler approach.
 
J

Joe Black

E. Jordan said:
I have a form that actively updates background queries via
executing modules "ON CHANGE" for certain parameters.

I began with macros and converted to visual basic to speed
things up, though I know essentially nothing about VBA.

I wish to disable screen refreshes while the scripts
execute, as they open and close several queries, which
results in a lot of flickering and on-screen activity.

If anyone can provide me with VBA scripting that I can
insert at the beginning and end of each module (or a
suggestion of a more efficient means of accomplishing
this), I would greatly appreciate it. Thanks in advance!

'turn off screen upates
DoCmd.Echo False

'turn on screen upates
DoCmd.Echo True

from Access help:
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.
 
G

Guest

-----Original Message-----


Put a line before you start tweaking:

Application.Echo False

and be sure to put

Application.Echo True

when you're done (or the screen will freeze waiting for you).

If you'ld care to post your code, someone might be able to suggest a
simpler approach.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top