Blink of Screen when Data Erased

G

Guest

I have a cmd button "New Input" on a form. When a user is finishing
inputting on record then the user cllicks "New Input" and most data is
removed. However, the screen blinks as data is being erased.

Is there a way where the screen does not blink? Also just to clarify, when
"New Input" is clicked the form does not go to a "new record". Other data on
the form is being erased. So I am deleting a lot of data from text boxes,
combo boxes, etc. (Most these boxes do not contains fields from the
underlining table for the form).

Thank you for any help.
 
M

Marshall Barton

Lamar said:
I have a cmd button "New Input" on a form. When a user is finishing
inputting on record then the user cllicks "New Input" and most data is
removed. However, the screen blinks as data is being erased.

Is there a way where the screen does not blink? Also just to clarify, when
"New Input" is clicked the form does not go to a "new record". Other data on
the form is being erased. So I am deleting a lot of data from text boxes,
combo boxes, etc. (Most these boxes do not contains fields from the
underlining table for the form).


Check Help for the Echo method. The general idea is
something like:

On Error GoTo ErrHandler
Application.Echo False
'update the text boxes
. . .
AllDone:
Application.Echo True
Exit Sub

ErrHandler:
MsgBox Err.Number & " - " & Err.Description
Resume AllDone
End Sub
 
G

Guest

Lamar,

I would try addinf the following lines to the start of the code behind your
"New Input" button:

docmd.echo false
docmd.hourglass true

Then at the very end of the code behind your "New Input" button place the
following code:

docmd.echo true
docmd.hourglass false

The "Echo" property will cause the changes being made to the controls and/or
data to not be displayed each time the changes occur but rather to wait until
the end of the code to again show the entire form in its current state.

The Hourglass property is just to show the hour glass during processing.
 

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