I solved my own problem. I didn't realize that my code that was doing the filtering was doing it at the time my code ran. I set the Filter then as soon as I turned it on (Me.FilterOn) Access does the filtering right there before exiting my sub routine. I thought that the filtering would be done after my my sub routine, so I didn't know the event where I could count the records. Here is the code that was placed in my routine:
Code:
Private Sub btnApplyFilter_Click()
' code to build "WHERE" clause
' filter data
Me.Filter = strWhere
Me.FilterOn = True ' Access does the filtering right after I set property
' data has been filtered at this point so I can get the recordcount if
' any records were found
If IsNull(Me.Recordset) Then
MsgBox "No RECORDS!"
Else
Dim rstClone As DAO.Recordset
Set rstClone = Me.RecordsetClone
rstClone.MoveLast
MsgBox "rstClone.RecordCount: " & rstClone.RecordCount
End If
End Sub