If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Speed
I am running Access 2000 VBA over a corporate LAN and need
the code to perform as fast as possible. The question is which is faster: dim or no dim for variables; using docmd.runsql or docmd.openquery; putting each subroutine in a separate module or putting related routines in one module? etc. Thanks |
#2
|
|||
|
|||
Speed
Even if it were faster (and I doubt it is), not using Option Explicit (which
therefore forces you to dim all variables) is a recipe for disaster as far as I'm concerned. I doubt there will be any noticable difference putting each subroutine in a separate module vs. putting related routines in one module. I personally believe the latter makes it easier to reuse the code. You might find setting a reference to DAO, and using the Database objects Execute method to be more efficient than either DoCmd.RunSQL or DoCmd.OpenQuery, plus it offers the ability to trap any errors that might arise in running the SQL. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "Carol" wrote in message ... I am running Access 2000 VBA over a corporate LAN and need the code to perform as fast as possible. The question is which is faster: dim or no dim for variables; using docmd.runsql or docmd.openquery; putting each subroutine in a separate module or putting related routines in one module? etc. Thanks |
Thread Tools | |
Display Modes | |
|
|