Examples: BeforeBody event


The following example uses the BeforeBody event to return the value of the Commissioned Sales field in the current body record of the RM Salesperson Report. If a salesperson’s commissioned sales are less than $200,000, the SuppressBand parameter stops the current body record from printing. The result is that the report prints only records for salespeople who’ve exceeded $200,000 in commissioned sales:

Private Sub Report_BeforeBody(SuppressBand As Boolean)
	If CCur(CommissionedSalesToDate) < 200000 Then
		SuppressBand = True
	End If
End Sub


Documentation Feedback