J
Jeff Byrd
I have a report that I would like to send one at a time to a printer for
each record in a query.
The reason not to print it as one report is that our printer will fold the
individaul reports saving our staff time.
Here is the code I have so far for looping through the query. I am stuck
with how to send the individual reports to the printer.
Function PrintReport()
Dim intRecordCount As Integer
Dim stDocName As String
stDocName = "Printtest"
'Delcale and instantiate a recordset object
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
'Open a recordset based on the result of the query
rst.Open "qryPrinttest", CurrentProject.Connection
intRecordCount = 0
'' Open report here???
Set mobjCurrentReport = stDocName
Do Until rst.EOF
intRecordCount = intRecordCount + 1
rst.MoveNext
Loop
End Function
Any help is appreciated.
each record in a query.
The reason not to print it as one report is that our printer will fold the
individaul reports saving our staff time.
Here is the code I have so far for looping through the query. I am stuck
with how to send the individual reports to the printer.
Function PrintReport()
Dim intRecordCount As Integer
Dim stDocName As String
stDocName = "Printtest"
'Delcale and instantiate a recordset object
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
'Open a recordset based on the result of the query
rst.Open "qryPrinttest", CurrentProject.Connection
intRecordCount = 0
'' Open report here???
Set mobjCurrentReport = stDocName
Do Until rst.EOF
intRecordCount = intRecordCount + 1
rst.MoveNext
Loop
End Function
Any help is appreciated.