Multiple Subform ......Calculating & Flicker Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi groupies!

I have never encountered this problem before, I hope I describe it properly.

I have a main form with 2 subforms. Basically what is happening is when I
make a change on either of the subforms the mouse starts to flicker and
"......Calculating" stays in the status bar. If I try to use a combo box it
closes up again right away.

Here is an example of how my data is set up:

My main form filters to a Company. Cascading combo boxes let me choose a
room and then a box in the room. When I select the box, the 2 subforms open
filtered to the correct box.

On the first subform I use a combo to select the item in the box and then
enter in a price.

On the second subform I use a combo to select an employee for this company,
another combo to select an item in the box and then enter in how many of
those items were sold by that employee.

I'm not sure why this is happening but it is almost as if there is a requery
or repaint going on but there isn't, I have checked everywhere.

It is important to note that this problem only happens if both of the
subforms are on the main form. If I remove either of them, then there is no
problem.

I am using Access XP at the moment. Would this not happen in 2003?

Does this make sense to anybody??
 
Sounds like you have triggered an event that triggers the original again.
It's quite easy to do.

An obvious case would be if you used the Current event of the subform to
Requery the main form. This reloads the main form, which causes the subform
to reload, so the subform's Current event fires again, and round you go.

Similarly, if the LinkMasterFields contains an expression or calculated
query field (not merely a table field), a Recalc can do it.

You mentioned that the problem only occurs if the main form contains both
subforms. If subform2 is dependent on subform1, that dependency can do it.

You mentioned cascading combos. It is possible that you have triggered the
endless recalculation there.

Conditional Formatting can do it too, so if you are using CF anywhere, you
might remove it to see if that helps.

There are other less obvious cases. To track those down, make a copy of the
database, and try removing all the code in the 3 forms' modules (saving in
Notepad.) It the problem is gone, paste half the code back in. Keep
narrowing it down until you identify the culprit.
 
Thanks for steering me in the right direction Allen.

I think I was over doing things with the Child/Master Links and also the
filtering links in the combo boxes. I fixed the problem by making one of the
forms Modal instead of a sub.
 
Back
Top