B
Brandon Schultz
I am using the example out the Northwinds Sample DB that uses the following
procedure
Sub PrintReports(PrintMode As Integer)
On Error GoTo Err_Preview_Click
Dim stDocName As String
Dim ReportSelection As String
ReportSelection = Me.cboLabelFormat
If ReportSelection = "JDC Format" Then
stDocName = "rptLabelsFormatJDC"
DoCmd.OpenReport stDocName, PrintMode
End If
Exit Sub
The code attached to my Preview button and my Print button looks like this:
Private Sub cmdPreview_Click()
PrintReports acPreview
End Sub
Private Sub cmdPrint_Click()
PrintReports acNormal
End Sub
My question is this; what code do I need to write to make use of a text box
on my form for number of copies. I realize that doing something like:
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut , , , , Me.txtQuantity
DoCmd.Close acReport, stDocName
would work but stDocName is in a different procedure and I have a lot of
report selections.
Thanks in advance for any guidance.
Brandon Schultz
procedure
Sub PrintReports(PrintMode As Integer)
On Error GoTo Err_Preview_Click
Dim stDocName As String
Dim ReportSelection As String
ReportSelection = Me.cboLabelFormat
If ReportSelection = "JDC Format" Then
stDocName = "rptLabelsFormatJDC"
DoCmd.OpenReport stDocName, PrintMode
End If
Exit Sub
The code attached to my Preview button and my Print button looks like this:
Private Sub cmdPreview_Click()
PrintReports acPreview
End Sub
Private Sub cmdPrint_Click()
PrintReports acNormal
End Sub
My question is this; what code do I need to write to make use of a text box
on my form for number of copies. I realize that doing something like:
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut , , , , Me.txtQuantity
DoCmd.Close acReport, stDocName
would work but stDocName is in a different procedure and I have a lot of
report selections.
Thanks in advance for any guidance.
Brandon Schultz