Link to home
Start Free TrialLog in
Avatar of MicheleRobinson
MicheleRobinson

asked on

Screen Flicker w/conditional formatting

I am using Access 2000 and in my current application with 3 subforms using conditional formatting, the controls with conditional formatting flicker until a mouse is moved over the control, or the screen is tabbed away from and returned to. I have tried putting "Echo False/True" combination in the open/load event for the main form. It did not help.  I have tried putting a form.repaint in the open event/load event. None of this seems to help.  The flickercontinues on the subforms. Different machines exhibit the same behavior. Is there a way to see which events are firing, or is this the wrong approach?
Avatar of dkmj17
dkmj17
Flag of United States of America image

Yeah- not sure what to tell you- I've had a bunch of trouble with conditionals myself... I'll be interested to see if somebody knows...

Mike
SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MicheleRobinson
MicheleRobinson

ASKER

I have tried setting focus to the control and away from it on the subform.  It does not seem to have any effect on the flickering. It seems to happen only on the initial load of the subform. After that, it seems to quiet down and Windows seems to behave. The number of records being evaluated is only a few hundred at best, and the number being shown is less than 10. At first, I thought it was the control being loaded with data, but it does not matter how long you wait, the flickering continues indefinitely, until a "repaint" is done.  I have tried to use the repaint command and the echo command, all to no avail.  Any other ideas?
what are the conditions- are they based on an expression?

Yes, in one instance I evaluate the contents of another control and change the color based on the value.  The color changes happens, but the control is on a continuous form and it flickers incessantly.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
know that some flicker is normal and you will NOT be able to get rid of it except by hiding the form during refresh which may not be optimal
It seems the only way to stop the flicker is to not have the conditional format on that field.  Not what the customer wants, but what else can I do?

(There were 2 fields with 2 different conditional formats on that subform.  It seems I can leave the first field as it was, but cannot have a (different) conditional format on the second field without the flicker condition)
_____________________
OK - what do I do about points in this situation?
It is sometimes very difficult to meet customer demands.  It is easier to manage customer expectations after some lengthy development experience is accrued.  This is one of those items where I will tell customer about this condition when I know it will present itself.

The points are yours to do with as you wish.  Understanding that some questions really don't have "good" answers.  Sometimes Experts need to deliver bad news or answers that we would rather not.

You can accept any one comment or split points across contributing Experts.  (see the "Split" button at the bottom of the page.)

Hi, I tried various ways get around this flicker problem and it seems that a short delay in the Open event provides an acceptable solution. I am using Access 2003.

e.g:

Private Sub Form_Open(Cancel As Integer)
    'The following code produces a short delay that eliminates flicker
    'caused by contitional formatting when mouse pointer coincides with
    'position of conditionally formatted controls when form first opens.
    Const cnstSecsInDay = 86400!
    Dim sngPauseTime As Single
    Dim sngStart As Single
    sngPauseTime = 0.1    ' Set duration.
    sngStart = Timer    ' Set start time.
    Do Until (Timer + cnstSecsInDay - sngStart) Mod cnstSecsInDay >= sngPauseTime
        DoEvents    ' Yield to other processes.
    Loop
End Sub

Hope this helps others who find their way to this page.

Steve