Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a report up so that is only prints the second page

Status
Not open for further replies.

Blitz

Technical User
Jul 7, 2000
171
US
What I have is a 2 page report that I only want the second page of to print unless a yes/no field = yes. Is there any way to do this? <br><br>What I need this for is for some of my records there are special instructions that I want to print out before the main report. I have the special instructions setup as page 1 of the report and the main report as page 2. So I have a &quot;special instructions yes/no&quot; field that I want if the field is yes it prints page 1 and page 2. If the field is no I just want it to print page 2. <br><br>Can this be done or am I dreaming?
 
You could use a macro with three actions<br><br>1. open report in preview mode<br>2. use the PrintOut action to print the second page only<br>3. close the report<br><br><br><br>PaulF
 
I've made something like this work be playing with the section the instructions were placed in.&nbsp;&nbsp;For instance, if your instructions were placed in the report header section, and your form control toggled the visible property of the report header, it could behave as you are asking. ie:<br><br>instructions placed in report header;<br><br>page break placed at the end of the report header, or making this section tall enough to completed a page;<br><br>using the on format event to determine from the selection if the header is visible.<br><br>HTH,<br>Drew
 
I understand what your saying and think it will do what I want but Im not sure how to make the on format event work. Could you please tell be what VB code to use? Thanks for any help.
 
ok well heres what I have so far but Im getting an error, maybe you guys could help me.<br><br>Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)<br>If Me!Exceptions Then<br>Me!PageHeader.Visible = True<br>Else<br>Me!PageHeader.Visible = False<br>End If<br>End Sub<br><br><br>But I get an error saying &quot;Microsoft access cant find the field &quot;PageHeader&quot; refered to in your expression&quot;<br><br>Anyone know whats causing this?<br><br>BTW &quot;Exceptions&quot; is the yes/no field that if yes I want the page header visible, if no I dont want it visible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top