Disable Save Question

johny678

Registered User.
Local time
Today, 11:02
Joined
Jun 8, 2005
Messages
28
I have a report which I use as a template to produce reports based on fields selected from a form. I want to disable the save question everytime I close the report so that it will not change otherwise I get errors from the code that generates the report.
I used the setWarning method in the On Close event but it is not doing the job since it saves the report without asking.
Can anyone tell me how to do that?
 
Am I right in saying that you are modifying the DESIGN of the report at runtime? If so, can you do something like
Code:
Me.Saved = True
to set the saved property without saving it? There is also the Me.Dirty property, but I think that just pertains to form and report records.

HTH
 
Yes, I do modify the design of the report at runtime. The thing is that I want after I print the report to close it without being prompted to save it and of course without having Access saving it. This way the report will remain as designed to work with the code that modifies it at runtime and I will not get any errors.
I inserted your code in the OnClose event of my report but it gives me the compile error "Method or data member not found". Any ideas???
 
In the OnClose event of the report try...

Code:
DoCmd.Close acReport, "YourReportName", acSaveNo
 
It also gives an error saying it cannot perform the action!!!
Is there any other way to have my report closing without any saving???
 

Users who are viewing this thread

Back
Top Bottom