Faster Recordset Searching

By | 2019-09-13

This really can make your database searching much faster if you implement this to a big database.

In normal search:

Do While Not record.EOF
   [search criteria]
   record.MoveNext
Loop

To improve the search process, you can use this method:

Record.MoveLast
intCount=Record.RecordCount
Record.MoveFirst

For i=1 To intCount
   [search criteria]
   Records.MoveNext
Next i

It can improve arround 40% faster. Try it!!

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.