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.