PDF Print Loop

  • Thread starter Hammer Rockwell
  • Start date
H

Hammer Rockwell

Hello All,

I am currently making a print DB that allows the user to setup a queue of
PDF documents to print. I am using Alex Dybenko PDFPrint code (excellent) but
I keep beating my head against looping the queue to print from a button:

Query Name: Queue
Fields: Fname,Fpath,Printq

Setup:

1) Load record set
2) Load first record
3) send to print X times (Value in printq)
4) Load next record, etc. Till end.

Any help would be appreciated.

Hammer
 
D

dymondjack

Try this:


Function PrintJobs()

Dim rs As DAO.Recordset
Dim iCount as Integer

Set rs = CurrentDB.OpenRecordset("Queue")

'Make Sure there's records in the rs
If rs.Recordcount <> 0 Then

'Move to first record
rs.MoveFirst

'Loop the recordset
While Not rs.EOF

'Run the loop for Printq
iCount = 0
While iCount < rs.Fields("Printq")
'Insert your print function here
Wend

rs.MoveNext
Wend

End If

rs.Close
Set rs = Nothing

End Function





something like that anyway...

--
Jack Leach
www.tristatemachine.com

- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain
 
D

dymondjack

I forgot to increment the the counter
'Run the loop for Printq
iCount = 0
While iCount < rs.Fields("Printq")
'Insert your print function here
Wend



--
Jack Leach
www.tristatemachine.com

- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain
 

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