Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing multiple forms or reports to a single fax document

Status
Not open for further replies.

Preka

Programmer
May 11, 2004
55
I've more or less gotten all of my faxing from access issues sorted out - this seems to be the last hurdle I need to overcome.

A little background to help clarify this question...
When we send a fax (which we do manually right now), it consists of several documents that we print out of access, all of which come out of seperate forms. In generic terms, one is a bill of lading, another is an instruction packet for the customer, and the third is a signature/release form.

We want to be able to fax these straight out of access using winfax.

Here is my problem: How do I get them all into a single fax?

Right now, I'm using DDE to send the recipient information to winfax. This is the only part I can DDE, since it more or less only sends information, and not the formatting (and the bill of lading, at least, has to look as it looks when printed).

Since the BOL is the really important part, that's all I've been playing with so far - so, it DDEpokes the recipient information, then prints the BOL to the fax driver - works fantastically.

If I try to print another form, however, even before the DDE code that transmits the fax, instead of adding it to the same fax, it will create a new one. Is there a way I can make it print all of these documents to the same fax message?

The only other alternative I can think of, and this is untested, would be to more or less recreate the forms appearance in winfax, and DDEpoke the information into the appropriate areas (not sure if this is possible).

Any thoughts?



 
Er just to simplify a bit, that was sort of longwinded, here's what I would ideally like it to do...

DDEpoke recipient info yadayadayada (I'm not all that well versed in what goes on at this stage, but I've gotten it to work through trial and error).

Open bill of lading form, print, close
open instruction form, print, close
open signature release form, print, close
transmit
 
You can use MSFAX is you wish. You just need to set up in outlook (thats my email client) add a new email called Fax Mail Transport. It is in the list you chose from. Then in the modules section place this code...
'********************************************************************************************
' This function will walk through the Customers table and fax the Invoices report which
' is filtered by the CustomerId field using MSFax through Access SendObject.
'
' This function assumes the report rptMSFaxInvoices has the default printer set to MSFax
' and the MSFax driver is installed correctly.
' *******************************************************************************************
'
Function MSFaxInvoices()

'********************************************************************************************
' Diming all variables
'********************************************************************************************

Dim dbsNorthwind As Database
Dim rstCustomers As Recordset

'********************************************************************************************
' Setting database and recordset variables
'********************************************************************************************

Set dbsNorthwind = CurrentDb()
Set rstCustomers = dbsNorthwind.OpenRecordset("Customers", dbOpenDynaset) ' Set Recordset to Customers table

'********************************************************************************************
' Walking through the Customers recordset until end of file, setting the global variable
' strInvoicesWhere to the current where and using SendObject passing
' customers fax number and report name.
'********************************************************************************************

If MsgBox("Do you want to fax invoices" & Chr(13) & "to all customers using MSFax?", 4) = 6 Then
With rstCustomers
Do Until .EOF
strInvoiceWhere = "[customerid] = '" & ![CustomerID] & "'" ' sets global strInvoiceWhere
DoCmd.SendObject acReport, "rptMSFaxInvoice", acFormatRTF, "[fax:" & ![Fax] & "]", , , , , False ' Runs Report to MSFax
.MoveNext ' Move to next record in Recordset
Loop
End With
End If


End Function

See where the sendobject uses "Fax:" and then adds the number from the table. This works great. Outlook sees the "Fax" then uses the Fax client and your phone line to fax the items.

Hope This Helps,
Jeremy
WZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top