I am trying to add a conditional page break in a report. I would like to force a new page if a check box in the just printed line is checked (true). Having trouble figuring out how to do this, any help would be greatly appreciated.
The db is used to track the locations and posting dates of signs for outdoor advertising. THis report is based off a query and basically tells the work cr4ews what needs to be done. The query has 3 check boxes, named "Up", "Down", and "rotate", respectively. One and only one of these will always be checked for each line of the report. What I need to do is force a new page if the "Down" box is checked, or continue printing if is is one of the other two.
I tried a sample Report but not quite successful. Anyway the Code is given below for you to try it out:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Reports![ReportName]![Down] Then
Reports![ReportName].Section(acDetail).ForceNewPage = 1
Reports![ReportName].Section(acDetail).ForceNewPage = 0