Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2005

Tip: Looking for answers? Try searching our database.

Errorhandling for a phone number field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
help! - 25 Jan 2005 21:01 GMT
Does anyone have code to stop the Access error pop-up when entering in a
phone number wrong. I would like to have my own error message pop-up.

thanks!
Graeme Richardson - 25 Jan 2005 21:21 GMT
Hi, trap the Form Error event, display your message and tell MS Access not
to display it's message:

Private Sub Form_Error(DataErr As Integer, Response As Integer)
   If DataErr = 2279 Then
       MsgBox "Text is not formatted correctly. Please re-enter"
       Cancel = acDataErrContinue
   End If
End Sub

You might also be able to parse the entered data and point out the specific
error.

HTH, Graeme.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.