SubForm Footer wont reload fast enough

R

Ray

I have a form with a related subform. After the form and subform have opened,
i use a command button on the form to modify the data in the subform using
append and update queries in the "on click" event. After the queries have
finished modifying the data in the subform, I requery the form and subform
while still in the "on click" event to refresh the subform data. The subform
has a textbox in its form footer that sums a column in the subform. My
problem is that the subform footer will not finish refreshing its values
until AFTER the "on click" event has finished. I need it to finish refreshing
the subform footer BEFORE the end of the "on click" event so I can use the
values in the footer to continue with more steps in the "on click" event. I
have tried requery, refresh and repaint as well as doevent to try to make the
subform footer finish updating so I can use the footer values later in the
subroutine. I have also tried to requery the subform itself and that doesnt
help either.

Any ideas as to how I can make the subform footer finish calculating its
text box values before the subroutine finishes running?
 
L

Lord Kelvan

add an event to the values being refreshed to haev after update
requery the value in the form footer

hope this helps

Regards
Kelvan
 
R

Ray

I tried something like the following previously .....

docmd.openquery "append query"
docmd.openquery "update query"

me.requery
forms![form]![subform].requery
forms![form]![subform]![text1].requery
DoEvents

msgbox (forms![form]![subform]![text1])


The msgbox still returned no value.
 
L

Lord Kelvan

yeah what i am saying is do that code but put a after update event on
the sub form that refreshes the forms![form]![subform]!
[text1].requery

Regards
Kelvan
 
R

Ray

I see what you are saying, but I found a better solution.
I solved the issue using DSum and DCount. Blew off refreshing [text1]
 

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