I created a report based on a query but must further restrict the report results. I’ve got 2 grouping levels & then in my detail section I tried inputing a series of if-then loops that verify what values are contained in the group & then exit the detail section if the record contains certain data.
My detail onFormat event was using a something like:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim x As Integer
x = Me.EventNumber
'BE...
If Me.PromotionType = "be" Then
If Me.ManagerName = "ken williams" Then
If (x < 3 Or x > 30) Then
Exit Sub
End If
End If
End If
But the above, plus minute variations on it do no good. ALL the records printed for each manager name includes every eventNumber not the ones I specify by my if-then criteria.
My detail onFormat event was using a something like:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim x As Integer
x = Me.EventNumber
'BE...
If Me.PromotionType = "be" Then
If Me.ManagerName = "ken williams" Then
If (x < 3 Or x > 30) Then
Exit Sub
End If
End If
End If
But the above, plus minute variations on it do no good. ALL the records printed for each manager name includes every eventNumber not the ones I specify by my if-then criteria.