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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the on format event to determine if the page header is visible.

Status
Not open for further replies.

Blitz

Technical User
Jul 7, 2000
171
US
Heres what I have so far, this is an event proceedure under &quot;on format&quot; of the page header of my report.<br><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>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
 
First of all, it looks to me like you have named your page header: PageHeaderSection, so that might be your first problem.&nbsp;&nbsp;<br>Second of all, to prevent the page header from displaying, you can use cancel as identified in the sub's parameter list.&nbsp;&nbsp;as in:<br>if Me!Exceptions then<br>&nbsp;&nbsp;&nbsp;&nbsp;cancel = 1 'true<br>else<br>&nbsp;&nbsp;&nbsp;&nbsp;cancel = 0 'false<br>endif <p>-Chopper<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top