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

Custom error messages

P: 39
Here's yet another one Mccarthy and Rabbit :)


I'm sure you know this since you know everything!

Do you just have to have error-checking code that pops up a msgBox and prevents the error in the first place, or is there actually a method to modify error messages?
Mar 3 '07 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,597
Here's yet another one Mccarthy and Rabbit :)


I'm sure you know this since you know everything!

Do you just have to have error-checking code that pops up a msgBox and prevents the error in the first place, or is there actually a method to modify error messages?
__1 In the Form's Error() Event, trap the specific Error(s) that you are looking for.
__2 Display your Custom Error Messages.
__3 Set the Response Parameter to acDataErrContinue
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Error(DataErr As Integer, Response As Integer)
  2. If DataErr = 3314 Then
  3.   MsgBox "Custom Error Message", vbExclamation, "Blah - Blah - Blah"
  4.   Response = acDataErrContinue
  5. End If
  6. End Sub
Mar 4 '07 #2

Post your reply

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