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 / Modules / DAO / VBA / January 2005

Tip: Looking for answers? Try searching our database.

run time errors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
New TO Access - 31 Jan 2005 07:41 GMT
Am I able to intercept run-time error messages and replace them with a more
meaningful message of my own? If so, how?

Thanks
Alex Dybenko - 31 Jan 2005 09:47 GMT
yes, sometihing like this:

Sub Test()
On error go to Proc_Err

'run some code here

Proc_Exit:
   exit sub
Proc_Err:
   select case err.number
       case 5
           msgbox "Custom error message"
       case else
           msgbox err.descrition
   end select
   resume Proc_Exit
end sub

so if you get err.number=5 - then user will get a messagebox with "Custome
error message"

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Am I able to intercept run-time error messages and replace them with a
> more
> meaningful message of my own? If so, how?
>
> Thanks
 
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.