Recordcount of filtered recordset slow

Posted on 2006-04-10
Medium Priority
Last Modified: 2013-12-25
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.
Question by:leeskelton83
LVL 12

Accepted Solution

Bob Lamberson earned 1000 total points
ID: 16422757
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.


Author Comment

ID: 16422880
I was trying to avoid opening another recordset but oh well.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month17 days, 9 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question