A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Closing Queries automatically saves them



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 11:40 AM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Closing Queries automatically saves them

I've noticed recently that when testing queries with filters, when i go to
close the query I am no longer prompted with the 'do you want to save' prompt.

Instead, the query just closes and saves my temporary filters. How can I
prevent this and get the prompt back please?
Thanks
  #2  
Old April 27th, 2010, 03:09 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Closing Queries automatically saves them

Is this happening in quereis with filters or even changes to forms and
reports? Open up a report and make a very minor change, such as moving a
label a little. Close it without saving. Do you get a prompt?

If not, someone has turned Set Warnings off in a macro or code, but forgot
to turn Set Warnings back on. People often do this for things like action
queries so that the users don't get bothered with the "You are about to "
messages.

In code it would look like so:
DoCmd.SetWarnings False

If not prompted for saving after any changes, you need to find where set
warnings is turned off and either comment out that line or add a set warnings
on towards the end of the function or macro.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Andy" wrote:

I've noticed recently that when testing queries with filters, when i go to
close the query I am no longer prompted with the 'do you want to save' prompt.

Instead, the query just closes and saves my temporary filters. How can I
prevent this and get the prompt back please?
Thanks

  #3  
Old April 27th, 2010, 03:14 PM posted to microsoft.public.access.queries
Andy
external usenet poster
 
Posts: 941
Default Closing Queries automatically saves them

Yeah, I was aware of the set warning function as I use this at the start/end
of my macros. However this is just going into a query design view and not
running it through VBA

"Jerry Whittle" wrote:

Is this happening in quereis with filters or even changes to forms and
reports? Open up a report and make a very minor change, such as moving a
label a little. Close it without saving. Do you get a prompt?

If not, someone has turned Set Warnings off in a macro or code, but forgot
to turn Set Warnings back on. People often do this for things like action
queries so that the users don't get bothered with the "You are about to "
messages.

In code it would look like so:
DoCmd.SetWarnings False

If not prompted for saving after any changes, you need to find where set
warnings is turned off and either comment out that line or add a set warnings
on towards the end of the function or macro.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Andy" wrote:

I've noticed recently that when testing queries with filters, when i go to
close the query I am no longer prompted with the 'do you want to save' prompt.

Instead, the query just closes and saves my temporary filters. How can I
prevent this and get the prompt back please?
Thanks

  #4  
Old April 27th, 2010, 03:19 PM posted to microsoft.public.access.queries
ghetto_banjo
external usenet poster
 
Posts: 325
Default Closing Queries automatically saves them

at some point you turned off the warnings and you never turned them
back on. check all your macros / vba
  #5  
Old April 27th, 2010, 03:26 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Closing Queries automatically saves them

Maybe something in your startup form or an autoexec macro is tripping set
warnings. Open the database while holding down the Shift key. Then
immediately do something with a query to see if the same behavior happens.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Andy" wrote:

Yeah, I was aware of the set warning function as I use this at the start/end
of my macros. However this is just going into a query design view and not
running it through VBA

"Jerry Whittle" wrote:

Is this happening in quereis with filters or even changes to forms and
reports? Open up a report and make a very minor change, such as moving a
label a little. Close it without saving. Do you get a prompt?

If not, someone has turned Set Warnings off in a macro or code, but forgot
to turn Set Warnings back on. People often do this for things like action
queries so that the users don't get bothered with the "You are about to "
messages.

In code it would look like so:
DoCmd.SetWarnings False

If not prompted for saving after any changes, you need to find where set
warnings is turned off and either comment out that line or add a set warnings
on towards the end of the function or macro.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Andy" wrote:

I've noticed recently that when testing queries with filters, when i go to
close the query I am no longer prompted with the 'do you want to save' prompt.

Instead, the query just closes and saves my temporary filters. How can I
prevent this and get the prompt back please?
Thanks

  #6  
Old April 27th, 2010, 04:12 PM posted to microsoft.public.access.queries
RonaldoOneNil
external usenet poster
 
Posts: 345
Default Closing Queries automatically saves them

Open up any module and then press CTRL-G. In the immediate window at the
bottom, type in DoCmd.Setwarnings True
This will turn back on the prompts. Check all your code to make sure you
have matching setwarning commands to turn them on/off.
Maybe you had an error in code so that the turning back on never got executed.

"Andy" wrote:

I've noticed recently that when testing queries with filters, when i go to
close the query I am no longer prompted with the 'do you want to save' prompt.

Instead, the query just closes and saves my temporary filters. How can I
prevent this and get the prompt back please?
Thanks

  #7  
Old April 27th, 2010, 05:39 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Closing Queries automatically saves them

On Tue, 27 Apr 2010 07:14:01 -0700, Andy
wrote:

Yeah, I was aware of the set warning function as I use this at the start/end
of my macros. However this is just going into a query design view and not
running it through VBA


If you have VBA or a macro that does Setwarnings False - and work for two
hours doing other things - it will still suppress warnings for *anything*.
That's the point. Setting Setwarnings False is a timebomb that you need to
either defuse or not set in the first place!
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.