Requery on Repaint?

J

Jon Lewis

On a very complex form I have a couple of calculated (unbound) text boxes
that are populated by a function called in the form's current event. The
function is quite slow as it involved opening a couple of DAO recordsets and
doing some calculations on them.

This was slowing up opening the form and navigating between records, so I
thought of having the function as the controls' ControlSources but this did
not result in any improvement.

I then thought about calculating the values in the query RecordSource of the
form, on the basis of at least getting improved performance on navigating if
not opening which was in fact the case.

However if I move another window over my opened and loaded form and move
across the calculated controls the screen badly stutters and almost freezes
and when I reveal the controls again I can see the values being recalculated
as if hiding and/or repainting forces a requery of the controls and maybe
the form.

Any thoughts or best practise for slow to calculate controls?

TIA
 

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