run time error 2498

C

Chey

On Error GoTo StartOutLook_Error
DoCmd.SendObject acSendReport, "Travel Request 0 Layover", acFormatRTF,
[Request Given to Email], , , "Travel Approved" & " " & [TA Number] & " " &
[First and Last Name], , False
StartOutLook_Error:
If Err <> 2498 Then ' Ignore the error
MsgBox "Error: " & Err & " " & Error
End If
Exit Function

I placed this code under on error.

"An expression you enterd is the wrong data type for one or the arguments"

That is true. However, I don't want it to pop up. I just want it to close.
I have a code for on close. So when I close and there is not an email being
sent out then I get this error message.

any suggestions on what I can do?
 

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