Hi. I have been trying to use the send object command to create an excel file of a query result and email it to an email address that in the query.
Here is the command I have been trying...
DoCmd.SendObject acSendQuery, "qryFilter", acFormatXLSX, [Query]![qryFilter]!, , , "A new record has been logged", "A new record has been logged in the system. Please see the attached file for details and open the system to update your actions"
I have been trying to use [Query]![qryFilter]![email] in the to section but to no avail.
What am I doing wrong?
Also can I take other values from the query and concatenate it to the subject line (i.e. record ID and description).
Many thanks in advance,
Sparky.
Here is the command I have been trying...
DoCmd.SendObject acSendQuery, "qryFilter", acFormatXLSX, [Query]![qryFilter]!, , , "A new record has been logged", "A new record has been logged in the system. Please see the attached file for details and open the system to update your actions"
I have been trying to use [Query]![qryFilter]![email] in the to section but to no avail.
What am I doing wrong?
Also can I take other values from the query and concatenate it to the subject line (i.e. record ID and description).
Many thanks in advance,
Sparky.