Elapsed Time

mlr0911

Registered User.
Local time
Today, 08:58
Joined
Oct 27, 2006
Messages
155
Does anyone know how I can capture the elapsed time of a query?
 
define the following windows api call in a module - no other code is needed

then refer to it as you require

eg

startquerytime = my_gettickcount

I think offhand the tickcount is in milliseconds, but you can keep calling this with eg an array of long, and display the differences in timing as you need.


Code:
Declare Function my_GetTickCount Lib "Kernel32" Alias "GetTickCount" () As Long
 
VBA also has a Timer function, which returns a single equal to the number of seconds elapsed since midnight and rounded to the nearest millisecond. Search "Timer" in VBA help for info, examples.
 

Users who are viewing this thread

Back
Top Bottom