Send Email

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Send Email

Post by burrina »

Trying to send a email with users password. Error,2046 sendobject isn't available right now

Code: Select all

DoCmd.SendObject acSendNoObject, "FormTyp", acFormatHTML, [EmpEmail], , , , "Here is your Password" & "  -  " & [opw], True, ""

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Send Email

Post by burrina »

tblEmployees is where their email is'
tblEmployees
EmpID
EmpName
EmpEmail

opw refers to their current password on the form.

User avatar
HansV
Administrator
Posts: 78421
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Send Email

Post by HansV »

If you do not want to send an object (such as a form or report), you should not specify the ObjectName and OutputFormat.

Code: Select all

DoCmd.SendObject acSendNoObject, , , [EmpEmail], , , , "Here is your Password  -  " & [opw], True
Best wishes,
Hans