Any help PLEASE!

Gregcat

New member
Local time
Today, 14:41
Joined
Mar 16, 2018
Messages
2
Hi, Please excuse me for asking a pretty dumb question. I'm a complete novice and need a little help to set up an email message when I click a tab in access 2016. My problem is that I am having difficulty writing in my On_Click VBA code.
This is my current code,

DoCmd.SendObject , "", "", DLookup("[E-mail Address]", "Contacts", "[ID]=" & Nz([Assigned To], 0)), "", "", "Delivery", IIf(Form.Description.TextFormat = 1, PlainText("Thank you " & Title & " for your Purchase Order # " & Description & "It has been scheduled for delivery on " & [Due Date] & ", Should this time be unsuitable please contact us by return email "someone@someone.com" or phone (08) 1234 1243 to reschedule for a more convenient time. "), Description & " Due: " & [Due Date]), True, ""

When it opens the email to be sent it looks like the Doc3.pdf attachment,

However I would like it to look like the Doc4.pdf attachment (If possible)

Are you able to help to write the code?

Cheers,

GregView attachment Doc3.pdf
 

Attachments

First, Greg, welcome to AWF.

Second, you might be able to find more immediate help if you use the forum's SEARCH function. Look near the top of the web page just under the part that identifies you by your login name. Third from the right you will find the SEARCH function.

Using the SEARCH function, look for "Send Mail" or "VBA Send Mail" as topics. You will get a LOT of examples. Somewhere in that pile will be what you want.

Third, and this is just a minor quibble... the Watercooler is a non-technical heading. You probably should have posted under General or Modules.
 
Moved out of the cooler.
 
Thanks for your help.
Sorry for the misunderstanding re the "Watercooler" :eek:
 
Another tip. You'll make it a lot easier on yourself now and in the future when/if you need to look back on your code, to create the sendObject components one by one

strAddress = Dlookup(.....
strHeader = ....
strBody =...

doCmd.sendObject , "", "", strAddress, .....
 

Users who are viewing this thread

Back
Top Bottom