Results 1 to 2 of 2

Thread: Access 97 VBA speed

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    1

    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?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width