Hello everyone,
I am using the following code to print my BOL report from command button on data entry form, with different footer, the code is working fine but printing all the pages 3 times , I want to know how i print the current page
Code is below
Thanks
Private Sub Command213_Click()
Dim x As Integer 'loop counter
For x = 1 To 3
Me.Painting = False
DoCmd.OpenReport "tblbolreport", acViewPreview
If x = 1 Then
Reports!tblbolreport!txtReportTitle.Value = "Customer Copy"
ElseIf x = 2 Then
Reports!tblbolreport!txtReportTitle.Value = "Seller Copy"
ElseIf x = 3 Then
Reports!tblbolreport!txtReportTitle.Value = "Office Copy"
Else
Exit Sub
End If
DoCmd.OpenReport "tblbolreport", acViewNormal
DoEvents
Me.Painting = True
Next x
End Sub
I am using the following code to print my BOL report from command button on data entry form, with different footer, the code is working fine but printing all the pages 3 times , I want to know how i print the current page
Code is below
Thanks
Private Sub Command213_Click()
Dim x As Integer 'loop counter
For x = 1 To 3
Me.Painting = False
DoCmd.OpenReport "tblbolreport", acViewPreview
If x = 1 Then
Reports!tblbolreport!txtReportTitle.Value = "Customer Copy"
ElseIf x = 2 Then
Reports!tblbolreport!txtReportTitle.Value = "Seller Copy"
ElseIf x = 3 Then
Reports!tblbolreport!txtReportTitle.Value = "Office Copy"
Else
Exit Sub
End If
DoCmd.OpenReport "tblbolreport", acViewNormal
DoEvents
Me.Painting = True
Next x
End Sub