Error Code 2046 when sending emails.

D

Dennis

Hi

I have an Access 2003 database which is used to maintain membership records
for a charity. On a member's record there is a button which sends an email
to the member. On my new computer I have windows 7 home premium and I am
using Windows Live email linked to my ISP.

This worked fine on my old computer with Windows XP and Outlook Express.
When I click on the button I now get the message Error Code 2046 The Command
or Action SendObject isn't available now.

The code is:

Private Sub btnEMail_Click()

Dim vMessage As String

On Error GoTo ErrorCode

vMessage = Nz(DLookup("EMailSubject", "tblPersonal"))
DoCmd.SendObject acSendNoObject, , , EMail, , , vMessage, , True
AddHistoryRecord MembersNo, "E-Mail Sent :- (" & vMessage & ")"
'add history record
lstHistory.Requery
Exit Sub

ErrorCode:
If Err = 2501 Then Exit Sub
'user Cancels E-Mail
Beep
MsgBox "Error Code " & Err & "; " & Error

End Sub

I know nothing about VBA but if someone could check the code for me at let
me know if I need to change anything I'd be grateful.

Thanks

Dennis
 

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