Dear pareez:
This can be done in code, but most people would advise you not to do it!
This change would affect all databases, not just yours. Your user would be
justifiably annoyed to find that this setting is being changed behind their
back. You can set this in code using the Application.SetOption method. For
example, in OnOpen Event of the first form of your application, you could
have the following, which sets an option for keyboard behaviour:
Application.SetOption "Behavior Entering Field", 1
You can set all kinds of options this way; there is a table in VBA help.
(Index: SetOptions; Topic "Set options from Visual Basic")
So... :
Application.SetOption "Confirm record changes", False
Application.SetOption "Confirm action queries", False
You could take the trouble to identify the current setting of this property
on opening the application, store this setting, change it for the purposes
of your application and re-set to the original setting before closing the
application, but if the application doesn't close properly, your "resetting"
code might not work.
An alternative would be to use "DoCmd.SetWarnings False" before running code
that will make changes, and then place "DoCmd.SetWarnings True" after the
changes have been made. This won't affect the application, but will prevent
the confirmation messages.
HTH
Fred Boer