Test sendobject to avoid error

C

Cathy

My database has a sendobject to send an e-mail. My problem is that some
users have a web based e-mail system (Lotus Domino Web) which will not work
with a sendobject and produces an error. How can I test if the sendobject
will work prior to running it?

Unless someone knows how to make it work properly with a web based
application!

Thank you,
Cathy
 
K

Klatuu

I don't know how to send an email from a web based e-mail system, but what
you can do is put an error handler in your code and trap for the specific
error it produces. I don't know the error number, but I am sure you do :).
But, here is the basic idea:

Private Sub SendMessage()

On Error GoTo SendMessage_Err

DoCmd.SetObject ....

SendMessage_Exit:

Exit Sub

SendMessage_Err:

If Err.Number = ??? Then
MsgBox "You E-Mail System does not support Emailing from Access"
Else
MsgBox err.number & " - " & Err.Description
End If
GoTo SendMessage_Exit
End Sub
 
C

Cathy

Thank you so much! I was off in the wrong direction. Thank you for your
recommendation. It worked perfectly.

Cathy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top