By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,161 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,161 IT Pros & Developers. It's quick & easy.

Automatically accepting/Rejecting Msg error in access

P: 22
Hi.
My program is giving me some errors,but i want to capture them so as each time i dont need to click "Yes" or "No". I want the application to accept/Reject the error so that my application can proceed.Plz help..
Thx
Aug 16 '07 #1
Share this Question
Share on Google+
1 Reply


missinglinq
Expert 2.5K+
P: 3,532
Error Messages don't allow the user to choose Yes or No! I'm guessing you're talking about the warnings you get when Access is about to do something, such as delete a record or append a record. In code you can turn off these warnings temporarily by using this code:

DoCmd.SetWarnings False 'Turn warnings off
'Code here to do whatever is throwing up the warning
DoCmd.SetWarnings True 'Turn warnings back on

Be sure to turn them back on after the triggering event. There may be times when you want to know when Access is going to do something; it may be something you didn't intend!

Welcome to TheScripts!

Linq ;0)>
Aug 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.