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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|