You can not only check how the filter was invoked, but you can also intercept the process when the filter is applied.
Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
Dim intAnswer As Integer
If ApplyType = acApplyFilter Then
intAnswer = MsgBox("You just selected the criteria: " & _
Chr(13) & Chr(10) & Me.Filter & _
Chr(13) & Chr(10) & "Are You Sure You Wish " & __
to Proceed?", vbYesNo + vbQuestion)
If intAnswer = vbNo Then
Cancel = True
End If
End If
End Sub
Related examples in the same category