Discussion Locked

Access 2K Form Flickers

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Several of my forms in Access 2000 flicker as I move from record to record. It stops when I move the mouse pointer over the form. I would think there'd be a way to prevent this, like triggering some code to run from the OnCurrent event, but I don't have time to research the details.

The forms that do this have about 40 fields with some conditional formatting. I use them to view legacy data for debugging, so I will reject any solutions that require me to split the form into several forms.

6 replies

by donq

I had a similar problem years ago with an earlier version of access and can't remember if fixing the problem long ago taught me to base EVERYTHING on query data so Access doesnt grab "pages" (flicker flicker) of stuff - but merely navigates througha RAM loaded recordset. Have fun and the solution is simple.

by dan.farrell

Thanks, but it didn't work. I even limited the query to show about 100 records, still flickers and the conditional fields don't activate until I pass the mouse pointer over the form.

Was worth trying, tho.

by seagull data services

I've found that this occurs with conditional formatting when you don't take account of the existing format when making the changes. This occurs mostly with timer events checking state.
What you need to do is to only change the formats that need to be changed.
For Example:
Red text if a value is less than zero, otherwise black.
The procedure would look something like this:
(The dots at the left margin are an attempt to preserve the formatting)
. if txtFieldName < 0 then
. if txtFieldName.forecolor <> vbRed then
. txtFieldName.forecolor = vbRed
. endif
. else
. if txtFieldName.forecolor <> vbBlack then
. txtFieldName.forecolor=vbBlack
. end if
. end if

This prevents a colour change if the forecolor is not already the required colour.
It is a nuisance to code and if anybody knows a simpler way PLEASE share it!! 8o)

If you have multiple formatting to do you can turn of the repainting of the form using

me.painting=false 'before starting
'do your formatting
me.painting = true 'when finished

you may need to force painting using me.repaint.

You should also make sure that any error handler includes the line
me.painting = true

Otherwise you may not be able to see anything that happens on the form.
Hope this helps
John

This discussion is closed to new replies.