Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh a Sub Report

Status
Not open for further replies.

eveCalypso

Programmer
Apr 29, 2003
134
GB
Good Day All,

I have a button on a subreport which brings up another (neccessary) form(A) - when this form(A) closes, I would like the subreport to requery/refresh, however, I can not find a single event which fires after my form(A) closes!
I can not put the refresh code under the button after calling the form, because it gets fired before the form is even opened.

Any help would be appreciated.
Regards,
EvE
 
Could you use the form A getting focus or being activated, which should happen when you close the subreport which opened it initially, and check if the form is open, and if it is not requery?
 
If you open Form(A) modal, then execution will halt in your sub report until Form(A) is closed by the user.
 
Thank you for your replies.
cjowsey: My form is modal.
I made a syntax error in that Form(A) is called from a button on a SUBFORM (not a subreport).

Even though A is modal, it still runs through all the code under the button before it runs Form(A).

I would indeed like it to stop execution at the point Form A is called.
Any other advice?

Perhaps another seeting in conjunction with Modal=yes that needs to be set?

Thank you in advance
Regards,
EvE
 
If you open the form with

DoCmd.OpenForm "Form(A)", , , , , acDialog

execution should stop in the calling form until you close Form(A). Then your next line of code under the button
Me.requery (or something similar)

will execute.

Hope this helps,
Clive
 
Yes, that is what I want! Except that it doesn't do it - it runs through...
Should pop-up be Yes/No?
or borderstyle = Dialog?

I really don't know why its doing what its doing :-/
Regards,
EvE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top