adamsherring
Jul 19 2005, 05:35 AM
Hi,
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?
freakazeud
Jul 19 2005, 05:44 AM
Hi,
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:
DoCmd.SetWarnings False
Or run with:
Db.Execute "....", dbFailOnError
All three methods should work either way since they are hardcoded.
Maybe you can clarify a little more.
HTH
Good luck
adamsherring
Jul 19 2005, 05:59 AM
freakazeud,
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.
Thanks,
Adam
freakazeud
Jul 19 2005, 06:35 AM
ahhh, ok.
Glad I could assist.
Remember to not forget to turn the warnings back on after you are done doing whatever you want to do:
DoCmd.SetWarnings True
and
Application.SetOption "Confirm Action Queries", 1
Application.SetOption "Confirm Document Deletions", 1
Application.SetOption "Confirm Record Changes", 1
GOod luck
adamsherring
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?
freakazeud
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!
HTH
Good luck
adamsherring
Jul 19 2005, 11:29 PM
Freakazeud,
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)
freakazeud
Jul 19 2005, 11:35 PM
Hi,
an action query is any query which does something (an action)

So this would be an append/delete/make table query...
HTH
Good luck
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.