« Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Display Modes The default error messages shown by DAP are as follows. get redirected here But if you prefer, you can take charge of the event and force it to do the following: Inhibit the internal message Display a custom message Redirect the application's flow Using

acDataErrContinue Ignore the error and continue without displaying the default Microsoft Access error message. Access Change Error Message For Required Field DataErr - contains the Error Number for the Error that just occurred. __2. Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you!

asked 3 years ago viewed 3045 times active 3 years ago Related 0How to populate an access database form with values from a search3MS-Access (Forms): allow user to enter invalid data

ie checking ranges or certain values, making sure required fields are completed and so on. We use advertisements to support this website and fund the development of new content. Form.Error Event (Access) Office 2013 and later Other Versions Office 2010 Contribute to this content Use GitHub to suggest and submit changes. Access Form Error Event I must say that not registered users redirect just fine to correspondent sales page.

Now open your Form, open the Property Sheet and change to the 'Events' tab and find the 'On Error', click the ellipse (...) and choose Code Builder. Select a range of cells, push the function button, select MEDIAN under st... Sample code provided by: Bill Jelen, MrExcel.com Copy Private Sub Form_Error(DataErr As Integer, Response As Integer) Select Case DataErr Case 2113 MsgBox "Only numbers are acceptable in this box", vbCritical, "Call http://bowindex.com/error-message/creating-error-messages-in-access-2010.php At it's simplest, you can use the Form_Error event to trap for this and otherrecord-level errors.

Add any additional errors as an ElseIf.Other errors you can trap: Limit to List: 2237Input Mask: 2279Required field: 3314Validation Rule: 2107Bad Data Value: 2113 Posted by Roger Carlson at 6:58 AM Set rst = dbs.OpenRecordset("AccessAndJetErrors") ' Loop through error codes. By running an event procedure or a macro when an Error event occurs, you can intercept a Microsoft Access error message and display a custom message that conveys a more specific Mar 27 '07 #3 Expert 5K+ P: 8,400 ADezii Echo!

A) If a visitor is NOT logged in, then they will see… (Image A) B) If a visitor IS logged in, then they will see… (Image B) If you see Image Susan Sales Harkins is an independent consultant and the author of several articles and books on database technologies. The last statement in the event inhibits the default message (see Figure A). Holy Macro!

You can create more complex code to respond to error events, that will trap multiple errors and respond to various problems. oZone View Public Profile Find More Posts by oZone 11-23-2008, 12:30 PM #10 gemma-the-husky Super Moderator Join Date: Sep 2006 Location: UK Posts: 13,118