In the following example, the BeforeAH event procedure sets the Level parameter to 2, indicating that the procedure runs for the second additional header on a report. The procedure then checks the value of the Checkbook ID field in the second additional header:
Private Sub Report_BeforeAH(By Val Level As Integer, SuppressBand _ As Boolean) If Level = 2 Then If CheckbookID = "PAYROLL" Then BankDepositPostingJournal.Cancel End If End If End Sub