By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,937 Members | 1,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,937 IT Pros & Developers. It's quick & easy.

Change the default 'Save' behavior to 'Don't save' when a report is closed.

P: n/a
jer
I have created a subroutine that opens a report in design view,
modifies the report (adds text boxes and grouping levels, etc.) then
opens in preview mode. I want to be able to close the report without
saving the changes, and without being prompted to save the changes. It
is easy enough to get rid of the save prompt by using
docmd.setwarnings=false; however, the default behavior of Access is to
save the design changes. I can't seem to find an event that fires
before the prompt. Thanks in advance for any help you can give me.

Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
jer wrote:
I have created a subroutine that opens a report in design view,
modifies the report (adds text boxes and grouping levels, etc.) then
opens in preview mode. I want to be able to close the report without
saving the changes, and without being prompted to save the changes. It
is easy enough to get rid of the save prompt by using
docmd.setwarnings=false; however, the default behavior of Access is to
save the design changes. I can't seem to find an event that fires
before the prompt. Thanks in advance for any help you can give me.


If you close the report from code, issue

docmd.close acreport, "reportname", acsaveno

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2

P: n/a
jer
Thanks for the reply. I tried using what you suggested, and it does
indeed work if I use, say, a command button to close the report. I
would like to close the report the normal way, though (I.E. with the X
in the corner). The save prompt pops up before any other code event is
run, so I haven't been able to tell the report not to save before the
prompt pops up.

Nov 13 '05 #3

P: n/a
jer
Thanks for the reply. I tried using what you suggested, and it does
indeed work if I use, say, a command button to close the report. I
would like to close the report the normal way, though (I.E. with the X
in the corner). When closing this way, the save prompt pops up before
any other code event is run. I haven't been able to figure out a way
to tell the report not to save before the prompt pops up.

Nov 13 '05 #4

P: n/a
"jer" <jm*****@moronifeed.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Thanks for the reply. I tried using what you suggested, and it does
indeed work if I use, say, a command button to close the report. I
would like to close the report the normal way, though (I.E. with the X
in the corner). When closing this way, the save prompt pops up before
any other code event is run. I haven't been able to figure out a way
to tell the report not to save before the prompt pops up.


I have never encountered a reason to modify the design of a report
on-the-fly using design view. Are you aware that many report properties
can be modified in the Open event and those changes are automatically not
permanently saved? Perhaps you could use that instead.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #5

P: n/a
jer
I have used the on open event of the report to modify some of the
properties to change the formatting and even some of the grouping
options. There are some things the on open event doesn't seem to
allow. For example, one of the things I am trying to accomplish is to
actually add a grouping level, as well as a couple of text boxes in
that grouping level when the report is opened. These are based on a
set of criteria selected by the user. I'm more or less just testing
the waters on this, though, and am certainly willing to re-think my
strategy. Thanks for your help.

Nov 13 '05 #6

P: n/a
"jer" <jm*****@moronifeed.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I have used the on open event of the report to modify some of the
properties to change the formatting and even some of the grouping
options. There are some things the on open event doesn't seem to
allow. For example, one of the things I am trying to accomplish is to
actually add a grouping level, as well as a couple of text boxes in
that grouping level when the report is opened. These are based on a
set of criteria selected by the user. I'm more or less just testing
the waters on this, though, and am certainly willing to re-think my
strategy. Thanks for your help.


I just never distribute anything but MDEs to users and opening stuff in
design view is just not an option then. You could have multiple grouping
levels that are normally ignored and just "turn them on" in the open event
instead of having to create them.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.