473,385 Members | 1,673 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,385 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 3142
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...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.