printing odd or even pages in a report (1 Viewer)

rob b

Registered User.
Local time
Today, 03:46
Joined
Sep 28, 2000
Messages
16
How can I print all the odd or even page numbers in a report. I want to print a telephone directory with pages back to back?
 
R

Richie

Guest
Create an unbound combo box on a form select value list and add the following "Odd";"Even" as record source
="Odd" default value
add a command button with the following code
Sub Command5_Click()
On Error GoTo Err_Command5_Click

If Me!PrintPages = "Even" Then
MsgBox "Odd Pages will be Blank!"
Else
MsgBox "Even Pages will be Blank!"
End If

Dim stDocName As String
stDocName = "RptYourReportName"
DoCmd.OpenReport stDocName, acPreview
Me.Visible = Not Me.Visible
Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click

End Sub
 

rob b

Registered User.
Local time
Today, 03:46
Joined
Sep 28, 2000
Messages
16
Hello richie
Thanks for the info on printing odds or even pages. Ive tried your code but I can't get it to work I must be missing something.
I guess that the combo box is called "printedpages" yes?
The message boxes appear correctly but the report still prints out all pages.
If I am doing something wrong I would appreciate any help.

Rob B
 
R

Richie

Guest
Sorry forgot this bit in on print event for detail sec add OddEven.TestOddEven
 

Users who are viewing this thread

Top Bottom