By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Prompt to Save?

P: 19
Hi,

I have noticed that when i am editing an object within my database, specifically a query and click to close it, it doesn't prompt me to save the changes and does it automatically. There have been cases where i do not want to save the changes and just wanted to know if there was a simple setting to turn off automatic saves??

Thanks

James
Feb 1 '08 #1
Share this Question
Share on Google+
5 Replies


JustJim
Expert 100+
P: 407
Hi,

I have noticed that when i am editing an object within my database, specifically a query and click to close it, it doesn't prompt me to save the changes and does it automatically. There have been cases where i do not want to save the changes and just wanted to know if there was a simple setting to turn off automatic saves??

Thanks

James
Hi James,

What version of Access are you using? My experience is that whenever you make a change to anything within Access and go to close it, you are asked if you want to save changes. Sometimes annoyingly so!

Jim
Feb 1 '08 #2

P: 19
Hi Jim,

I am using version 2003.

The problem is, when i amend data in a table (maybe for test reasons) or edit the SQL within a query and go to close it it saves my changes automatically, even though i didn't want to save......very annoying also! :O)

Thanks
Feb 1 '08 #3

jaxjagfan
Expert 100+
P: 254
Make sure if any of your processes are using

Docmd.Setwarnings False

That at the end of the process you include

Docmd.Setwarnings True

Otherwise all warnings for data changes and object changes are turned off and are automatic.
Feb 1 '08 #4

missinglinq
Expert 2.5K+
P: 3,532
You should always use Docmd.Setwarnings False and
Docmd.Setwarnings True in dandem, of course, but be aware: If your code bombs between the two, Access will be left with Docmd.Setwarnings False in place! So anytime you use them in a sub, you should include Docmd.Setwarnings True in your error handling routine.

Welcome to TheScripts!

Linq ;0)>
Feb 1 '08 #5

JustJim
Expert 100+
P: 407
Both >4 and >5 are correct and good advice. I would also add that I habitually insert
Expand|Select|Wrap|Line Numbers
  1. CleanUpAndLeave:
  2. DoCmd.SetWarnings = True
  3. DoCmd.HourGlass = False
  4. Set (any databases, connections, recordsets etc) = Nothing
  5. Exit Sub
into any sub I write with more than about 5 lines... and before any Error Handler I use.

I don't think this answers your main question though. Any time you make a change to an object, Access should be asking you if you want to save changes when you close that object.

Except when you change data in a table, either directly or via a query or form (which would be based on a table or query anyway). That does get saved automatically*. As my mate Bill Gates used to say "That's not a bug, it's a feature"

Jim

* but that can also be intercepted programatically.
Feb 2 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.