Thank you for your help.
I seem to be having a problem with this part:
Send_Email (strDPath & strFName), "name@mydomain.com"
Here's the full Name file and send Email code.
I seem to be having a problem with this part:
Send_Email (strDPath & strFName), "name@mydomain.com"
Here's the full Name file and send Email code.
Public Function Command21_Click()
Dim strRep As String
Dim strDPath As String
Dim strFName As String
' What report to send
strRep = "Run_Notifications"
' Initial Path
strDPath = "S:\Name\Will Call 2012\Sent\"
' Filename
strFName = (DLookup("[Dlr_Code]", "99 - Dealer Email")) & "_Order_" & (DLookup("[MinOfOrder_Number]", "99 - Dealer Email")) & "_thru_" & (DLookup("[MaxOfOrder_Number]", "99 - Dealer Email")) & "_" & Format(Date, "mm-dd-yyyy")
'add file extension
strFName = strFName & ".pdf"
' Output report as pdf
DoCmd.OutputTo acOutputReport, strRep, "PDFFormat(*.pdf)", strDPath & strFName, False, "", 0
' Send the report to whoever
Send_Email (strDPath & strFName), "Name@mydomain.com"
End Function