L
ldiaz
I have a main form Named:frm_Broker and a Subform named: sfrm_Control
Main form datas like:
ID_Broker_ID Control_Num Rec_Date From_Supplier
1 CTRL-001 9/26 Tokio Inc.
and subform is linked to the main form, the subform shows datas like this:
ID_Control Part Number Attachment Qty TN#
1 XXXAAA c:\myfiles\invoice926.pdf 1
1254254
1 XXXAAB c:\myfiles\invoice927.pdf 1
1254254
1 XXXAAC c:\myfiles\invoice928.pdf 1
1254254
I have a query named:qry_broker where I can filter these datas based in the
Control_Num field of the main form.
Like Nz([Forms]![frm_Broker]![Control_Num],"*")
all these datas are shown in a report named: rpt_Broker
I have this code to send the report as attachment:
Private Sub EmailReport_Click()
On Error GoTo Err_EmailReport_Click
Dim stDocName As String
stDocName = "rpt_Broker"
DoCmd.SendObject acReport, stDocName
Exit_EmailReport_Click:
Exit Sub
Err_EmailReport_Click:
MsgBox Err.Description
Resume Exit_EmailReport_Click
End Sub
But I would like also attach pdf files that are shown on the subform;
c:\myfiles\invoice926.pdf
c:\myfiles\invoice927.pdf
c:\myfiles\invoice928.pdf
how can I do that?
Thanks in advanced.
Main form datas like:
ID_Broker_ID Control_Num Rec_Date From_Supplier
1 CTRL-001 9/26 Tokio Inc.
and subform is linked to the main form, the subform shows datas like this:
ID_Control Part Number Attachment Qty TN#
1 XXXAAA c:\myfiles\invoice926.pdf 1
1254254
1 XXXAAB c:\myfiles\invoice927.pdf 1
1254254
1 XXXAAC c:\myfiles\invoice928.pdf 1
1254254
I have a query named:qry_broker where I can filter these datas based in the
Control_Num field of the main form.
Like Nz([Forms]![frm_Broker]![Control_Num],"*")
all these datas are shown in a report named: rpt_Broker
I have this code to send the report as attachment:
Private Sub EmailReport_Click()
On Error GoTo Err_EmailReport_Click
Dim stDocName As String
stDocName = "rpt_Broker"
DoCmd.SendObject acReport, stDocName
Exit_EmailReport_Click:
Exit Sub
Err_EmailReport_Click:
MsgBox Err.Description
Resume Exit_EmailReport_Click
End Sub
But I would like also attach pdf files that are shown on the subform;
c:\myfiles\invoice926.pdf
c:\myfiles\invoice927.pdf
c:\myfiles\invoice928.pdf
how can I do that?
Thanks in advanced.