Unbound Calculation Controls Not Displaying in Continuous Subform

G

Guest

I have: A continuous subform with controls, including some unbound
calculation controls.

Problem: When the subform loads, the values in the bound controls are
displayed, but the values in the unbound calculation controls are not. I
tried inserting code to refresh the subform, but it didn't work. If I switch
to another application on my taskbar, then back again to the form, the
calculation values are displayed.

I want: The values in the unbound calculation controls to be displayed.

Any suggestions?

Daniel
 
M

Marshall Barton

DevDaniel said:
I have: A continuous subform with controls, including some unbound
calculation controls.

Problem: When the subform loads, the values in the bound controls are
displayed, but the values in the unbound calculation controls are not. I
tried inserting code to refresh the subform, but it didn't work. If I switch
to another application on my taskbar, then back again to the form, the
calculation values are displayed.

I want: The values in the unbound calculation controls to be displayed.


This usually happens when the calculations are fairly
complicated, especially if they use a Domain Aggregate
function. The problem seems to be that the processing task
that calculates the control expressions runs at a relatively
low priority and the processing task that updates the
display runs at an even lower priority.

We have a little bit of control over this by using the
Repaint method and/or one or more DoEvents statements. On
rare occasions even a Recalc helps. I'm not sure where you
can use those, but try the Load event. The next event after
the Load event would be the Current event, but unless the
display update problem happens every time you navigate to a
different record, you don't want to do all that for every
record navigation action.

A different approach that you could try is to simplify the
calculations in some way I can't even speculate about.
 
G

Guest

I used Me.Repaint in the subform's OnLoad event. The calculations display
within a few seconds. Thanks for your help, Marshall!
 

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