Jul 19 2005, 05:35 AM
I have an application that I built in access. I changed the preferences in access to disable any warnings for adding or deleting records (I issue those warnings myself).
Everything to that aspect works fine, until I move it to another computer. My application uses the settings from whichever computer it is being run on. Is there a way to programmatically set some of the database preferences? Specifically to mute all addition/deletion warning messages?
Jul 19 2005, 05:44 AM
how did you change the preferences to not show any warnings?
The only ways I know of is via VBA code with either:
Application.SetOption "Confirm Action Queries", 0
Application.SetOption "Confirm Document Deletions", 0
Application.SetOption "Confirm Record Changes", 0
Or run with:
Db.Execute "....", dbFailOnError
All three methods should work either way since they are hardcoded.
Maybe you can clarify a little more.
Jul 19 2005, 05:59 AM
In the Options, tools menu, check the "Edit/Find" tab.
There is a "Confirm" frame containing the types of messages to issue.
Yeah, those are the kinds of things i'm looking for.
Jul 19 2005, 06:35 AM
Glad I could assist.
Remember to not forget to turn the warnings back on after you are done doing whatever you want to do:
Application.SetOption "Confirm Action Queries", 1
Application.SetOption "Confirm Document Deletions", 1
Application.SetOption "Confirm Record Changes", 1
Jul 19 2005, 11:19 PM
Will setting those warnings to off effect all other MS Access Apps run on that machine? Or is it contained within the scope of the dbase app that sets them?
Jul 19 2005, 11:23 PM
I believe it will just affect the database it was set with. But if you forget to turn them back on then all other errors/warnings in the db will be supressed as well and corruption or worth things can happen in the background and you have no idea that they are!
Jul 19 2005, 11:29 PM
Agreed, but the only warnings I am going to supress are the overwrite & delete actions. Question : What falls under an "action" query?
(Application.SetOption "Confirm Action Queries", 1)
Jul 19 2005, 11:35 PM
an action query is any query which does something (an action)
So this would be an append/delete/make table query...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here