Re: Substituting a more user friendly error message
From: Roger Carlson (NO-Rog3erc-SPAM_at_hotmail.com)
Date: 11/08/04
- Next message: SMac: "3 Forms Linked, last one not updating correctly"
- Previous message: Allen Browne: "Re: Conditional Formatting works with XP Home but not XP Professional"
- In reply to: John S. Ford, MD: "Substituting a more user friendly error message"
- Next in thread: Joe Williams: "Re: Substituting a more user friendly error message"
- Reply: Joe Williams: "Re: Substituting a more user friendly error message"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 09:40:37 -0500
You can do this in the On Error event of the FORM. Put something like the
following in the event:
'-----------------------------
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2279 Then '**not formatted for input mask**
MsgBox "The number is not formatted properly"
ElseIf DataErr = 2213 Then '**not a real date**
MsgBox "The number is not a real date"
Else
MsgBox DataErr
End If
Response = acDataErrContinue
End Sub
'-----------------------------
You can trap any number of form level errors here.
-- --Roger Carlson Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L "John S. Ford, MD" <johnsfordNOSPAMmd@hotmail.com> wrote in message news:e0JyQOWxEHA.1524@TK2MSFTNGP09.phx.gbl... > I'm using Access 97. > > I have an entry form that requires users to input several dates in some > TextBoxes. If the user enters data not in an acceptable date format, an > Access error message pops up that is not very user friendly. Is there a way > I can substitute my own (hopefully kinder, gentler message) for the standard > message? > > Does this action by my user trigger an Error Event that I can capture and > write my own error handler? If so how? > > John > >
- Next message: SMac: "3 Forms Linked, last one not updating correctly"
- Previous message: Allen Browne: "Re: Conditional Formatting works with XP Home but not XP Professional"
- In reply to: John S. Ford, MD: "Substituting a more user friendly error message"
- Next in thread: Joe Williams: "Re: Substituting a more user friendly error message"
- Reply: Joe Williams: "Re: Substituting a more user friendly error message"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|