I hope someone can tell me the best way to to this:
I have a button that on click I send an email message to staff letting them know letters were mailed. I would like to add code to auto populate the number of letters based off a query I have created that contains the count.
QueryName= "ltrcount"
FieldName="sndltrcount" (this field calculates the number of records using GroupBy/Count)
Can I auto populate the calculation from this field from query in the message being sent below?
Here is my code:
DoCmd.SendObject acSendNoObject, , , "FName.LName@tn.gov", "FName.LName@tn.gov", , "Non-Registered Prescriber Notification", "FName, " & [sndltrcount] & "letters have been mailed to a list of Non-Registered Prescribers," & vbNewLine & "if any of the letters come back undeliverable; please deliver to ______." & vbNewLine & vbNewLine & "Do Not log these in the Return Mail Database" & vbNewLine & vbNewLine & "Attached is a copy of the Template Letter." & vbNewLine & vbNewLine & "Thanks," & vbNewLine & "____", 1
Thanks,
Lisa