Is it one of those things where the code knows you’re watching so it doesn’t misbehave?
Are you viewing in Report View or Print Preview? Code doesn't run in Report View.
Date: Thu, 28 Apr 2016 11:20:48 -0700
Subject: [MS_AccessPros] Access Report Format event question
I have a report that have several headers named
I want to hide the headers if there is no data for them. I have the following code in both OnFormat events, below. It works great and then it does not. But if we just open the VBA window to the events. and then close the VBA window it works.
When it does not work it shows the headers. When it works the headers are NOT visible.
Is there something missing from the code or something else?
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
Cancel = IsNull(Me!Subdept)
Private Sub GroupHeader2_Format(Cance! l As Integer, FormatCount As Integer)
Cancel = IsNull(Me!Subdept2)
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (3)|