Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Each page of the Report needs to be a separate print job
Message
From
16/03/1999 10:50:01
 
 
To
All
General information
Forum:
Microsoft Office
Category:
Access
Title:
Each page of the Report needs to be a separate print job
Miscellaneous
Thread ID:
00198100
Message ID:
00198100
Views:
51
We have an Access Report that prints collection letters for all customers meeting the criteria for query "0-30 letter". The record source for the report is set to "0-30 letter" (the query). This runs fine, however, we now need to automatically fax (using winfax) each letter to the appropriate customer. In order to fax each separate page to a new fax number, it appears that we need to have each page be a separate print job. We have tried the following code in VB to call the OPENREPORT command with a where clause to print only one customer at a time but it is not working. Does anyone have any ideas on how we can print each page (customer) as a new print job?
Rem Begin SA code
Dim dbs As Database, rst As Recordset
Dim rstLetter1 As Recordset, strSQL As String
Dim strCustno As String

' Return reference to current database.
Set dbs = CurrentDb
' Create table-type Recordset object.
Set rstLetter1 = dbs.OpenRecordset("0-30 LETTER")

Do
Debug.Print rstLetter1.CUSTNO.Value
strCustno = rstLetter1.CUSTNO.Value
stDocName = "1-30 Letter"
DoCmd.OpenReport stDocName, acViewPreview, , rstLetter1.CUSTNO.Value = strCustno
rstLetter1.MoveNext
Loop Until rstLetter1.EOF

' Free all object variables.
rstLetter1.Close
Set dbs = Nothing
Rem end SA code
Reply
Map
View

Click here to load this message in the networking platform