fax unique reports to customers

S

s

I have a report that I want to fax to customers. Each report is unique to
each customer (same report, different items, different number of items in
detail section).

I want to run the module so that it:
1) Creates the query for customers that need the report faxed to (be able
to view and edit if customer should receive fax prior to running the rest of
the module)
2) Run module to fax to each verified customer
3) Create report that lists what customers got the fax, completion time, #
of pages, if not completed - why?

Does this sound like I'm on the right path? Has anyone done something like
this that could share their code; or maybe point me to a source that would
have code samples? I also use WinFax Pro and would consider including this
in the app if it would be easier, but I doubt it.

Thanks for your input.

steve
 
A

Alex Dybenko

just an idea how you can do this (in cas you using outlook):
- make access report to be sent as fax
- using docmd.SendObject send it to each fax
- then you can connect to outlook, read it sent items folder - and find
there when fax was send, etc. sample code you can find in KB -
support.microsoft.com


HTH
 
S

s

Thanks Alex. I downloaded kb299016 and have played around with it. There
are two lines of code that has me baffled though:

strInvoiceWhere = "[CustomerID] = '" & ![CustomerID] & "'"
I know the syntax, left value takes middle value, middle value comes from
right value, but why?

When I run the module, I get an error on this line:
DoCmd.SendObject acReport, "Invoice", acFormatRTF, _
"[fax: " & ![Fax] & "]", , , , , False
Again I'm lost as to why.

Here is the entire example for the Northwind db:

Option Explicit

Public strInvoiceWhere As String
'****************************************************************
'This function will walk through the Customers table and fax the
'Invoice report, which is filtered by the CustomerID field using
'MS Fax through the MS Access SendObject.
'
'This function assumes the Invoice report has the default printer
'set to MS Fax and the MS Fax driver is installed correctly.
'****************************************************************
Function FaxInvoices()
Dim dbsNorthwind As DAO.Database
Dim rstCustomers As DAO.Recordset

Set dbsNorthwind = CurrentDb()
Set rstCustomers = dbsNorthwind.OpenRecordset("Customers", _
dbOpenDynaset)

If MsgBox("Do you want to fax invoices" & Chr(13) & _
"to all customers using Microsoft Fax?", 4) = 6 Then
With rstCustomers
Do Until .EOF
'Create the Invoice report Filter
'used by the Report_Open event.
strInvoiceWhere = "[CustomerID] = '" & ![CustomerID] & "'"
DoCmd.SendObject acReport, "Invoice", acFormatRTF, _
"[fax: " & ![Fax] & "]", , , , , False
.MoveNext
Loop
End With
End If

rstCustomers.Close
End Function

Thanks again for you help,

steve
 
A

Alex Dybenko

strInvoiceWhere = "[CustomerID] = '" & ![CustomerID] & "'"
I know the syntax, left value takes middle value, middle value comes from
right value, but why?

sorry, dont understand
When I run the module, I get an error on this line:
DoCmd.SendObject acReport, "Invoice", acFormatRTF, _
"[fax: " & ![Fax] & "]", , , , , False
Again I'm lost as to why.


so what error you get?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top