Hi Experts,
I have a report that contains multiple Header / Footer Sections.
Based on a Criteria I want to make then visible or invisible.
To do this I have created the following code that I believe should be triggered as each record is read however the code is never triggered. i.e. The MsgBox never displays.
[code]Private Sub Report_Current()
On Error GoTo STEP_999
MsgBox "Step 000-Report On Current Event - R-46-010"
'As Of: 2020/07/12.
If SELECTION_30 = "Summary" Then
GroupHeader1.Visible = "False"
GroupHeader0.Visible = "False"
GroupHeader2.Visible = "False"
GroupFooter4.Visible = "False"
GroupFooter5.Visible = "False"
GoTo STEP_900 'Step 900-Shutdown.
ElseIf SELECTION_30 <> "Summary" Then
GroupHeader1.Visible = "True"
GroupHeader0.Visible = "True"
GroupHeader2.Visible = "True"
GroupFooter4.Visible = "True"
GroupFooter5.Visible = "True"
GoTo STEP_900 'Step 900-Shutdown.
End If
STEP_900:
'Step 900-Shutdown.
STEP_990:
'Step 990-Exit Event.
Exit Sub
STEP_999:
'Step 999-Form Error Handler Code.
Dim DebugErrMsgOpt999 As String
DebugErrMsgOpt999 = "Yes" 'Un-Comment for use. '**
If DebugErrMsgOpt999 = "Yes" Then
MsgBox Err.DESCRIPTION & " (" & Err.Number & ")"
Resume STEP_990 'Step 990-Exit Event.
Else
Resume STEP_990 'Step 990-Exit Event.
End If
End Sub
How can I trigger the code?
Thanks,
Bob C.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.