Subform redraw problem (1 Viewer)

AndyBannister

Registered User.
Local time
Today, 22:27
Joined
Aug 10, 2001
Messages
31
Hi,

I hope somebody can help with this one ..

I have a large form containing two subforms. Both subforms display datasheets (both consist of one field pulled from a table, the other is a calculated field with conditional formatting applied depending on the content of the field).

The first subform works fine.

The second consistently refuses to repaint the calculated field correctly. I can force it to repaint by, get this, simply pointing the mouse anywhere at the subform (then all 20 or so records repaint). Equally, scrolling by clicking on one of the scrollbar arrows means the new records that appear as the window is scrolled have no calculated field showing. But if I scroll by dragging the slider bar, then the window redraws fine.

Help, help, and help again.

Is this an Access bug, or is there something I can do to fix this extremely annoying problem. As I say, what is particular bizarre is that subform 1, which is almost identical works fine.

Thanks.

Andy
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 19, 2002
Messages
43,464
I think it may be a focus issue. Try setting focus to a field in the subform and then setting it back to whereever you are.
 

llkhoutx

Registered User.
Local time
Today, 16:27
Joined
Feb 26, 2001
Messages
4,018
Are you executing a "requery" of both your subforms when the links change?

I use sub-sub forms frequently and never have a reapinting problem, as long as I requery.
 

AndyBannister

Registered User.
Local time
Today, 22:27
Joined
Aug 10, 2001
Messages
31
Thanks for your replies:

1) llkhoutx, I have done the requeries okay. As I say, the problem manifests even when scrolling through the window showing the subform. Access is not redrawing properly.

2) Pat, I tried your focus suggestion, and still nothing.

What I can report is that I have recoded the underlying subform giving the difficulty so that the table now contains no calculated fields (it was a calculated field in particular that was not being refreshed as the window scrolled). All fields now appear fine.

However ... (isn't there always a however) ...

... the conditional formatting still refuses to apply. Access simply shows the table in plain vanilla format. As soon as you simply point the mouse at the window, the conditional formatting magically appears!

This is becoming increasingly annoying, as my subform makes quite heavy use of colour highlighting on one field to alert the user to key information.

Any more ideas?

Many thanks.

Andy
 

Users who are viewing this thread

Top Bottom