تفضل
قم بتوظيف الاوامر من خلال القائمة المختصرة عند عرض التقرير للمعاينة
Public Function PrintEvenPages()
Call PrintOddEven(False)
End Function
Public Function PrintOddPages()
Call PrintOddEven(True)
End Function
Private Sub PrintOddEven(ByVal binOdd As Boolean)
Dim rpT As Report
Dim intPages As Integer
Dim intPage As Integer
Dim intStart As Integer
On Error GoTo ErrLine
Set rpT = Screen.ActiveReport
intPages = rpT.Pages
If binOdd Then
intStart = 1
ElseIf intPages = 1 Then
MsgBox "There are no even pages to print.", vbExclamation, "One page report"
GoTo ExitLine
Else
intStart = 2
End If
'check for only one page
For intPage = intStart To intPages Step 2
DoCmd.PrintOut acPages, intPage, intPage, acHigh, 1
Next
ExitLine:
On Error Resume Next
Set rpT = Nothing
Exit Sub
ErrLine:
'Call ReportError("PrintOddEven")
Resume ExitLine
End Sub