473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
6 3137
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
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
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: DJ | last post by:
I have a .NET datagrid that has a column of dropdownlist controls. If the user changes the value in the dropdown in one or more rows I will set a flag. If the user subsequently attempts to (1)...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
2
by: jmadsen | last post by:
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...
5
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is...
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
1
by: KPS | last post by:
I'm attempting to create a simple treeview-like behavior in JavaScript. The desired behavior happens in IE but I cannot get the same to happen in FireFox. The primary thing I want to accomplish...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
8
by: Phil Stanton | last post by:
Using Access 2000 (Yes I know there is no Printer specified) and an MDE File (Yes I know I can't open a report in design view). Is there any way using VBA of temporarily changing the report's...
35
by: bukzor | last post by:
I've found some bizzare behavior when using mutable values (lists, dicts, etc) as the default argument of a function. I want to get the community's feedback on this. It's easiest to explain with...
4
by: Perl Beginner | last post by:
Hello, I have written a VB program (VB 6.0) that is basically a GUI for the user to select from various buttons to run other executable files (which I wrote in Perl). When the Perl executable is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.