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

Report_Close and Save Problem

Status
Not open for further replies.

proximity

Technical User
Sep 19, 2002
132
GB
Hi,

On the Report_Close event (Access 97), I have the following code:

Function UtilSave()
docmd.OutputTo acReport, "rptUtilityReport", "RichTextFormat(*.rtf)", "", False, ""
End Function

Obviously, I want the user to be able to save the report where he/she likes. However, Access won't let me do it as it throws up error 2585 and tells me that the action cannot be carried out on an OnClose, OnOpen etc event.

Any thoughts????

--
Steven
 
Are u attempting to Export the same report that is open. Could be recursive issue? Try a different approach.

Perhaps add your code to the location/button where the report is called from. I would offer a Yes/No prompt to see if user actaully wants to generate an export file.

htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top