B
basic
I have a program which at the push of button prints out invoices. I am trying
to get a copy of these invoice saved to a file of some sort so I can e-mail
it out to a customer. I know a little bit about Access but can't figure this
out. I think the code below is what triggers the printing, hopefully this
code is what needs tweaking to be able to get the invoices saved as a file.
' This function will print all of the priced invoices
'
Public Function PrintInvoicesWithPrices(Optional bPreview As Boolean)
Dim lType As Long, strF As String
On Error GoTo erh
If bPreview Then
lType = acViewPreview
Else
lType = acViewNormal
End If
SetReportType shpInvoiceWithPrices
strF = GetInvoiceFilterString
If strF = "" Then
Err.Raise vbObjectError + 1, "Shipping.Main", "The filter string used to
determine which invoices to print is blank (an error occured while comouting
it)."
End If
DoCmd.OpenReport "rptShipments", lType, , strF
GoTo eotf
erh:
apiuerror "Main", "PrintInvoicesWithPrices", 0
Resume eotf:
eotf:
End Function
to get a copy of these invoice saved to a file of some sort so I can e-mail
it out to a customer. I know a little bit about Access but can't figure this
out. I think the code below is what triggers the printing, hopefully this
code is what needs tweaking to be able to get the invoices saved as a file.
' This function will print all of the priced invoices
'
Public Function PrintInvoicesWithPrices(Optional bPreview As Boolean)
Dim lType As Long, strF As String
On Error GoTo erh
If bPreview Then
lType = acViewPreview
Else
lType = acViewNormal
End If
SetReportType shpInvoiceWithPrices
strF = GetInvoiceFilterString
If strF = "" Then
Err.Raise vbObjectError + 1, "Shipping.Main", "The filter string used to
determine which invoices to print is blank (an error occured while comouting
it)."
End If
DoCmd.OpenReport "rptShipments", lType, , strF
GoTo eotf
erh:
apiuerror "Main", "PrintInvoicesWithPrices", 0
Resume eotf:
eotf:
End Function