Problem with update warning message

Stuart Green

Registered User.
Local time
Today, 12:09
Joined
Jun 24, 2002
Messages
108
When you run an update query it normally gives you a warning message that can be disabled under TOOLS/OPTIONS/EDIT. This works fine on a PC with the full Access on, but try as I might I cannot get the warning to be disabled in run time versions of my database. Any suggestions as to how I can fix this please as the warning involves 2 extra mouse clicks per action that I do not want the users to have to do.
 
Many thanks Pat, will give this a try. Does this command work across the database or is it form specific e.g., can I set it in an opening menu and it will work for all forms? Having switched it off, why would I want to switch it back on?
 
Stuart

You would attach the code to the button on a form that you will run the queries from (supposing this is the way that you are doing it). For example:

Code:
Private Sub cmdRunHolidayQueries_Click()
'------------------------------------------------
'Attached to command button: cmdRunHolidayQueries
'------------------------------------------------
'Turn off system warnings
    DoCmd.SetWarnings False
'Run Update Query
    DoCmd.OpenQuery "Update Holiday"
'Turn system warnings back on
    DoCmd.SetWarnings True
End Sub

You would also turn the warnings back on as once the query is ran, the messages would never be evident again in the database, which may cause problems if a user does something else where warnings were required.

HTH

Graham
 

Users who are viewing this thread

Back
Top Bottom