Originally Posted by
June7
Have to apply filter criteria to form or report so only the one record is exported.
DoCmd.OpenReport ...
DoCmd.SendObject ...
DoCmd.Close ...
any chance you can elaborate a little for me as i m still struggling,
as with one permutation(syntax)I get an option for filtering and the other i don't, and oddly enough the place I really need it is where I don't have the filtering option
Code:
DoCmd.OpenReport "RFW_rpt_single_request", acViewPreview, , strWhere1
DoCmd.Minimize
this works but and pulls only one record but not editable( so I need it in RTF )
Code:
DoCmd.SendObject acSendReport, "RFW_rpt_single_request", acFormatRTF, _
strEmail, , , "For " & strAll & ",.... " & "Please find attached an initial request for a Dep-Invoice Num from : " & myname & " " & myphone & " Our System ID # " & Me.Prefix & vbCrLf & MymessageBody & vbCrLf & MyCCmessage & vbCrLf & vbCrLf & Mydownload & vbCrLf & vbCrLf & " " & URLAddress
the above gives me a rtf attachment just as I need but multiple sheet of the same record
Code:
DoCmd.SendObject acSendForm, "RFW_frmOrders", acFormatRTF, strEmail, _
, , "For " & strAll & ",.... " & "Please find attached an initial request for a Dep-Invoice Num from : " & myname & " " & myphone & " Our System ID # " & Me.Prefix & vbCrLf & MymessageBody & vbCrLf & MyCCmessage & vbCrLf & vbCrLf & Mydownload & vbCrLf & vbCrLf & " " & URLAddress
the above gives me all the records in the datebase from the specific table...with no filter for one record
Code:
DoCmd.SendObject acSendReport, "RFW_rpt_single_request", acFormatPDF, strEmail, _
, , "For " & strAll & ",.... " & "Please find attached an request for a final invoice number for fullpayment from : " & myname & " " & myphone & " Our System ID # " & Me.Prefix & vbCrLf & MymessageBody & vbCrLf & MyCCmessage & vbCrLf & vbCrLf & Mydownload & vbCrLf & vbCrLf & " " & URLAddress
The above gives me a pdf with again multiple sheet of the dame record(and is not an RTF) so its of no use either
So if you don't mind , could you help with the correct syntax for pulling one filtered record in RTF attached to an e-mail ..thanks ever so much