A2007 Split Form Flicker

R

R Fourt

Well, MS has created yet another source for screen flicker, the Split Form.

I've got a split form with conditional formatting. On Load everything is
fine. When I apply a Filter, the datasheet view flickers on the first record
and the entire "form" area flickers.

Here's where it's weird. If I move the mouse, the flickering stops. Yes, the
status bar does show Calculating.... during the flickering which suggests the
CF is the problem.

Any thoughts on how to eliminate this seizure inducing issue?

Thanks,
Robert
 
A

Allen Browne

It's very easy to create a circular dependence that triggers flickering.

For example, say you have an unbound text box (Text0) on your form (Form1.)
If you refer to it in the form's filter, e.g.:
[SomeField] = [Forms].[Form1].[Text0]
you create a situation where Access has to read the text box so it can load
the form and supply the values to the text boxes, whereupon it thinks it may
need to supply the value from the text box back to the source data, and so
on.

Similarly, if your Condtional Formatting depends on a calculated text box
e.g. where the Control Source is =Sum([Amount]), it calculates the total and
applies the CF, and then wonders if the total changed the CF value and so it
needs to calculate that again, which retriggers the CF, and so on.

Another example is where an event triggers other events that retrigger the
original. On obvious one is where you use the Current event of a subform to
filter a main form, which reloads the subform, which re-trigger's the
subform's Current event and so it goes on.

While I have not tested it specifically, it would not be surprising if
A2007's split form triggered the same problem. Because there are 2 copies of
the data, a cyclic display dependency would be very easy to create. In fact,
the chances of this kind of bug would be very high.

You may be able to find a workaround if you can understand the cause of the
problem. For the first example above, you just remove the dependency by
including the literal text instead of the textbox reference:
Me.Filter = "[SomeField] = """" & Me.Text0 & """"
Me.FilterOn = True

If it occurs only in the split form, the only solution might be to avoid the
CF.
 
R

R Fourt

Allen,

Thanks for the detailed response. In my particular form there are no unbound
controls that are used in filters or conditional formatting. There are also
no calculated fields.

I created a new split form using the wizard and NO flicker. I then went on a
property by property comparison and found the problem to be in the "Split
Form Size" property. I had mine set to a specific height and the wizard had
set it to "Auto". When I changed mine to Auto, NO flicker. However, if you
move the "splitter bar" (the divider between the split form and the form),
the flicker returns.

So, like you suspected, there is a small bug in the split form. So I guess
I'll live with the flicker or go back to a form/sub form.

Allen Browne said:
It's very easy to create a circular dependence that triggers flickering.

For example, say you have an unbound text box (Text0) on your form (Form1.)
If you refer to it in the form's filter, e.g.:
[SomeField] = [Forms].[Form1].[Text0]
you create a situation where Access has to read the text box so it can load
the form and supply the values to the text boxes, whereupon it thinks it may
need to supply the value from the text box back to the source data, and so
on.

Similarly, if your Condtional Formatting depends on a calculated text box
e.g. where the Control Source is =Sum([Amount]), it calculates the total and
applies the CF, and then wonders if the total changed the CF value and so it
needs to calculate that again, which retriggers the CF, and so on.

Another example is where an event triggers other events that retrigger the
original. On obvious one is where you use the Current event of a subform to
filter a main form, which reloads the subform, which re-trigger's the
subform's Current event and so it goes on.

While I have not tested it specifically, it would not be surprising if
A2007's split form triggered the same problem. Because there are 2 copies of
the data, a cyclic display dependency would be very easy to create. In fact,
the chances of this kind of bug would be very high.

You may be able to find a workaround if you can understand the cause of the
problem. For the first example above, you just remove the dependency by
including the literal text instead of the textbox reference:
Me.Filter = "[SomeField] = """" & Me.Text0 & """"
Me.FilterOn = True

If it occurs only in the split form, the only solution might be to avoid the
CF.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

R Fourt said:
Well, MS has created yet another source for screen flicker, the Split
Form.

I've got a split form with conditional formatting. On Load everything is
fine. When I apply a Filter, the datasheet view flickers on the first
record
and the entire "form" area flickers.

Here's where it's weird. If I move the mouse, the flickering stops. Yes,
the
status bar does show Calculating.... during the flickering which suggests
the
CF is the problem.

Any thoughts on how to eliminate this seizure inducing issue?

Thanks,
Robert
 
R

R Fourt

As an addendum to my last post. The flicker returns whenever there is a
change to the recordset source, ie, applying a filter.
 

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