Refresh Hell

R

Robert_L_Ross

I know there must be an easy way to do this.

I have a form that uses the OnCurrent event to update the form's caption
with specific information (in this case, information on the current record).

The problem is that when applying a filter to the form, I have to use the
'docmd.gotoreocrd , , aclast' and 'docmd.gotorecord , , acfirst' commands to
find the total recordset for another field on the form.

When I do that - you guessed it, the caption 'flickers' with the last
record's info then updates to the first record's info.

How can I stop the caption from updating only when I'm applying the filter?
Is there a command that 'stops refresh' while executing code, so that the 'on
current' event won't fire...or a way to null the 'on current' event while I'm
running the code to apply the filter?
 
J

Jeanette Cunningham

Robert,
you can hide screen updating with DoCmd.Echo False
But you must be careful to always turn Echo back on, otherwise the user will
be left unable to see any changes on screen after they use controls.
Even put echo back on in the error handling of the sub.

Jeanette Cunningham
 
R

Robert_L_Ross

Jeanette,

I KNEW there would be some simple command that I had overlooked! Thanks -
it works perfect now.
 

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