473,770 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.setwarnin gs=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 3168
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.setwarnin gs=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*****@moroni feed.com> wrote in message
news:11******** *************@c 13g2000cwb.goog legroups.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*****@moroni feed.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.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
4359
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) leave the page, or 2) close the window, I want to present an Alert reminding them to first submit their data. Anyone know how to do this? TIA, Dewey
13
6114
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 during production. Usually, this only wraps code used to control quitting the whole app versus just shutting a form, but it can also control many other things. However, as part of the build before delivering an update, I have to remember to...
2
405
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 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...
5
7123
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 the printer destination for special reports such as stickers and mailing labels. The Mailing Label report is, of course, designed here for a specific printer (Mailing Label). At another site, the name could be completely different. Other than...
7
11249
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 the the reports "integrated security" from TRUE to FALSE via the "Set Location" dialog in the report designer with no success. It is not intuitive (at least not to me.) I get the following error:
1
2470
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 is to set the id and href of some objects dynamically during the onload of the page instead of hard-coding it in the HTML. I want to set the id/href so when I add new entries I don't have to remember to increment the id's. In FireFox, the href...
25
6101
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
2883
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 printer from the default printer for that report to a PDF995 printer (so that i can print it to a file for subsequent emailing) then back to the default Epsom 830 printer? Thanks for any help Phil
35
2248
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 code. This example is trivial and has design issues, but it demonstrates a problem I've seen in production systems: def main(argv = ): 'print out arguments with BEGIN and END' argv.insert(1, "BEGIN")
4
3580
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 complete it writes the results to MS Excel. So back to the VB GUI, I have a second form (Form2) where the user can go and select one of the excel reports and open it to view. I’ve written the code in VB so that when the user initially clicks the...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.