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 / April 2005

Tip: Looking for answers? Try searching our database.

Error Handling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pjscott - 21 Apr 2005 18:27 GMT
I'm using Sql 2000 and Access 2002.

I have a Maintenance database that has a button when clicked sends a report
as a e-mail attachemnt.

The problem I'm having is if someone uses the database that their e-mail
profiles isn't setup on.

When they click the button they get two errors:

You cannot create a new MS Outlook profile at this time. To create  a new
profile...

and

No profile have been created. To create a new profile, use the Mail icon in
the Control Panel.

Is there a way to replace these error message with a custom error message
using error handling?

Thanks for the help,

Paul
Klatuu - 21 Apr 2005 22:15 GMT
Yes,
first you need to find out what the error numbers are that cause the error.  
One way to do that is to create your error routine for the procedure, and put
a break point on the first line of executable code in the error routine.  
There you will find the error number(s).  Then, in your error handler"

My_Error_Routine:
  If Err.Number = ???? Then
     msgbox "What Ever You Want to Do or Say"...
  Else
     whatever you do for an unhandled error
  endif
 GoTo Main_Rtn_Exit
End Sub

> I'm using Sql 2000 and Access 2002.
>
[quoted text clipped - 20 lines]
>
> Paul
John Nurick - 21 Apr 2005 22:49 GMT
Hi Paul,

This should be possible by writing code that uses the Outlook object
model. www.outlookcode.com and www.slipstick.com are good places to look
for this sort of thing.

>I'm using Sql 2000 and Access 2002.
>
[quoted text clipped - 20 lines]
>
>Paul

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
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.