I agree with Tony's assessment that you should try to avoid using the
DoCmd.SetWarnings if at all possible. The CurrentDb.Execute method is
definitely preferred.
That being said, and as others have pointed out, you probably have either a
spot where you didn't reset the warnings OR you hit an error before the set
warnings true could be reset and didn't have that as the first line in an
error handler in the function, or sub, that used it. So, as mentioned also,
it is easy to create a function that you can place in a standard module:
Private Function ResetWarnings()
DoCmd.SetWarnings True
End Function
And then just go to that function in your VBA window and click the Run
button and it should turn things back on for you. But you should fix things
so that it won't happen again.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at
http://www.btabdevelopment.com
__________________________________