Recordcount of filtered recordset slow

I am using the rst.Filter method and then trying to do a count of the filtered recordset. The problem is that the recordcount pauses for about 10-15 seconds. But for other larger recordset that are not filtered, recordcount works pretty fast. Does anyone know why this is or how I can get around it.
Who is Participating?
Bob LambersonSoftware EngineerCommented:
The filter method is slow, especially if you have a lot of records or criteria.

It would be better to set another recordset variable and create an sql string to execute to fill it. You can use your filter condition as a where clause in the sql. This should be much faster.

leeskelton83Author Commented:
I was trying to avoid opening another recordset but oh well.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.