Popup Form and Report

hooi

Registered User.
Local time
Tomorrow, 02:13
Joined
Jul 22, 2003
Messages
158
Hi There,

I have a dialog popup window that allows me to choose from a list of selections, upon clicking on the Proceed button, a report based on the selection is displayed. The popup remains on top of the report, when the user chooses a different selection and then click on the Proceed button again, it should refresh the report based on the new selection. How can this be achieved? Thanks...
 
Last edited:
Not sure if you can refresh a form once it's open. You could however add some code the your proceed button that will close the report and open it again (you will need to make sure it only tries to close the report if it's already open though).
 
Hi Stephen,

How can I detect whether the report is already open?
 
Yes, but I don't know of a built in function for it.
Check out this which might help. It's to check if a form is open but it should work ok with a report I think.
 
Thank you Stephen.

Here is the code that works for report:

stDocName = "rptSubscriptionCost"
If CurrentProject.AllReports(stDocName).IsLoaded Then
DoCmd.Close acReport, stDocName
DoCmd.OpenReport stDocName, acPreview
Else
DoCmd.OpenReport stDocName, acPreview
End If
 

Users who are viewing this thread

Back
Top Bottom