Send Email Issue

vaughan198

Registered User.
Local time
Yesterday, 16:22
Joined
Nov 16, 2011
Messages
40
Hi there I am trying to get my access form to send a report and have the subject of the email be a field from a query (or report - it is the same). I have the following code
Code:
DoCmd.SendObject acSendReport, "New Accounts Request", acFormatPDF, "[EMAIL="email@email.com"]email@email.com[/EMAIL]", , , "New Account Request for: " & [New Account Query].[ClientName]", , True
The main issue seems to be not the sending of the email but how to pull out the ClientName from the query or report. The report is run from the query which only displays the newest record (i.e the one I want to send).
Thanks for any help.
 
Try replacing this:

[New Account Query].[ClientName]"

with

DLookup("[ClientName]", "[New Account Query]")
 
Perferto!
Thanks
 
No problemo!
 

Users who are viewing this thread

Back
Top Bottom