Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speed things up 1

Status
Not open for further replies.

badfinger66

Technical User
Aug 7, 2003
3
US
I have created a large scale Inventory control & Manufacturing application. We've been using it for about 3 years now and everything functions fine but, due to my limited knowledge, I have all my tasks set up with macros which kick off multiple action queries...some of which can take some time (Batch updates etc.)...Is there an easy way to convert action queries into VBA? Or do I really need to sit down and learn VBA? Would I see a measurable speed increase? Probably my longest function takes about 3 minutes...

I have converted Macros to Modules but, the module just calls the query and, I don't see any real speed increase with that...

 
Well, I'd learn VBA...

To get you started replacing your action queries, if the SQL for your query is UPDATE tblCustomer SET Surname=... ; then VBA syntax to achieve the same result is something like:
Code:
CurrentDb.Execute "UPDATE tblCustomer SET Surname=... ;"
In certain situations (and since you're looking to speed things up) you may find the following marginally faster:
Code:
DBEngine(0)(0).Execute "UPDATE tblCustomer SET Surname=... ;"
Hope this is enough to get you started.


[pc2]
 
Thanks for the input. That should get me rolling.

I am using Access 97 for this application.
 
question:

if you have two instance of access open (different db) and you use in the second db

DBEngine(0)(0).Execute "UPDATE tblCustomer SET Surname=... ;"

will that effect the first one opened? I don't know how that works really!




Randall Vollen
National City Bank Corp.
 
Hwkranger - best to replace
Code:
DBEngine(0)(0)
with
Code:
CurrentDb
to ensure you perform the SQL on the correct database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top