-
Access 97 VBA speed
Alright, I know Access97 is old and shouldn't be used anymore but that's what I have right now. I just started this job about 2 months ago and this is what my predesessor used so I have to use it until I have time to upgrade. Now my problem is this, I have two modules that run almost the exact same code, but one is extremely faster than the other. They both open Excel files and write data from tables into preformatted reports. The only differences are the sql statements that gather the data into the recordsets. The faster module actually gathers a lot more data than the slower one. I have no clue why one is slower, especially with less data. I have gone over everything in both modules, comparing, and made them almost exactly the same. The only differences are what is a must for each report.
Anyone have an idea why one would run faster than the other?
-
Re: Access 97 VBA speed
Welcome to the Forums.
The only difference being the query results will mean that the query for one
module is faster because it may be using less joined tables/sub queries so
there will be less overhead running the query. Also, just because one is
returning less records doesn't mean anything. If the source tables have major
record differences then it will take longer for the one with more records in the
base tables to return a fewer number of records then the other query that
may have less records in its base tables returning more resulting records.
HTH