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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ON Close Event Report close form msgbox 1

Status
Not open for further replies.

RachelK

Programmer
Mar 18, 2002
171
GB
Hi,

I have a form that has the parameters in to run a report the report runs fine. what I would like to know from the user when they exit the report do they want to go back to the the run report screen again or do they want to go to switchboard. I would like a message box to ask the user do you want to run the report again yes no if they say no open switchboard if they say yes open the form. Any idea's. Cheers Rachel.
 
[tt]if msgbox("Report again?",vbyesno)=vbyes then
docmd.openform "frmReport"
else
docmd.openform "frmSwitchboard"
end if[/tt]

But - opening forms can be a performance drag, have you considered having them open, but setting their visible property to false, then in the reports on close event either make the report form visible, or close it, and make the switcboard visible? Would require code to check whether the form was open, perhaps like the IsLoaded function in the Northwind sample database or Rohdem's faq faq181-320.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top