<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff
size=2>Rocky,</FONT></SPAN></DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff size=2>IINM,
the load even of the main form happens AFTER all of the load events of all of
the subforms. One way to do this would be to dim an instance of the timer
class globally <gasp> and have the switchboard click
call mclsTimer.StartTimer. </FONT></SPAN></DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff size=2>Then
have the main form's load event call the MsgBox
mclsTimer.EndTimer & " ms total elapsed time - Hit any key to continue", ,
"TIME FORM LOAD"<BR></FONT></SPAN></DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff size=2>Do
this with an otherwise identical JIT form and a non JIT form. The
difference in times would be the load time of the subforms.</FONT></SPAN></DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff size=2>When I
was timing form loading I actually set up a loop that opened the form, then
closed it again, repeating that X times. This evened out the effects of
caching etc. In that case, simply instantiate the class before entering
the loop, then display the results after exiting the loop.</FONT></SPAN></DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264295516-25062003><FONT face=Arial color=#0000ff size=2>I can
modify your demo if you want to send it to me.</DIV>
<DIV><BR></DIV></FONT></SPAN>
<P><FONT size=2>John W. Colby<BR>www.colbyconsulting.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Rocky Smolin
- Beach Access Software<BR><B>Sent:</B> Wednesday, June 25, 2003 11:37
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> Re: [AccessD]
Time in milliseconds<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>John:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Will it work across forms?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm demonstrating your Just-In-Time forms at the
AUGSD tonight and since it's a single user box the difference in opening time
is hard to see, even though it's a factor of 2-4.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I think I need to start my timing from the Main
Menu Click event that opens the form with the sub-forms in it, as some of the
processing of loading the sub-form's recordsets goes on even before the called
form's OnOpen event. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jcolby@colbyconsulting.com
href="mailto:jcolby@colbyconsulting.com">John Colby</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">accessd@databaseadvisors.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 25, 2003 6:47
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] Time in
milliseconds</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Rocky,</FONT></SPAN></DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Here is the class I use for timing things such as the opening of
forms and such, with a timer test function you can place in a module to
play around with the class. Dead simple to use.</FONT></SPAN></DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>The nice thing about using a class is that you can have as many
instances as you need timing various stuff since the variable tracking
elapsed time is private to the class instance.</FONT></SPAN></DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff size=2>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Option Compare Database<BR>Option Explicit<BR>Dim mclsTimer As
clsTimer</FONT></SPAN></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Function TestTimer()<BR>Set mclsTimer = New
clsTimer<BR> MsgBox "Hit any key to continue", , "TIMER
TEST 1"<BR> MsgBox mclsTimer.EndTimer & " ms elapsed
time - Hit any key to continue", , "TIMER TEST 1"<BR>
MsgBox mclsTimer.EndTimer & " ms total elapsed time - Hit any key to
continue", , "TIMER TEST 2"<BR>
mclsTimer.StartTimer<BR> MsgBox "Hit any key to continue",
, "TIMER TEST 3"<BR> MsgBox mclsTimer.EndTimer() & "
ms elapsed time", , "TIMER TEST3"<BR> Set mclsTimer =
Nothing<BR>End Function<BR></DIV></FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Option Compare Database<BR>Option
Explicit<BR>'.===============================================================<BR>'.Copyright
2001 Colby Consulting. All rights
reserved.<BR>'.E-mail : <A
href="mailto:jcolby@colbyconsulting.com">jcolby@colbyconsulting.com</A><BR>'.===============================================================<BR>'
DO NOT DELETE THE COMMENTS ABOVE. All other comments in this
module<BR>' may be deleted from production code, but lines above must
remain.<BR>'---------------------------------------------------------------------<BR>'.Description
: Implements the instantiated class for: clsTimer<BR>'.<BR>'.Written
By : John W. Colby<BR>'.Date Created : 05/28/2001<BR>' Rev.
History :<BR>'<BR>' Comments
:<BR>'---------------------------------------------------------------------<BR>'.<BR>'
ADDITIONAL
NOTES:<BR>'<BR>'---------------------------------------------------------------------<BR>'<BR>'
INSTRUCTIONS:<BR>'---------------------------------------------------------------------<BR>'.<BR>'THESE
CONSTANTS AND VARIABLES ARE USED INTERNALLY TO THE CLASS<BR>'*+ Class
constant declaration<BR>'*- Class constants declaration</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>'*+ Class variables declarations<BR>'*- Class variables
declarations</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>'THESE CONSTANTS AND VARIABLES ARE USED BY THE CLASS TO<BR>'IMPLEMENT
CLASS FUNCTIONALITY<BR>Private Declare Function apiGetTime Lib "winmm.dll"
_<BR>
Alias "timeGetTime" () As Long<BR>'*+ custom constants declaration<BR>'*-
Custom constants declaration</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>'*+ custom variables declarations<BR>Dim lngStartTime As Long<BR>'*-
custom variables declarations</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>'THESE FUNCTIONS / SUBS ARE USED INTERNALLY TO THE CLASS<BR>'*+
Private Init/Terminate Interface<BR>Private Sub
Class_Initialize()<BR> StartTimer<BR>End Sub<BR>'*- Public
Init/Terminate interface<BR>'*- Parent/Child links interface<BR>'THESE
FUNCTIONS / SUBS ARE USED TO IMPLEMENT CLASS FUNCTIONALITY<BR>'*+Class
function / sub declaration<BR>Function EndTimer() As
Long<BR> EndTimer = apiGetTime() - lngStartTime<BR>End
Function</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=240483413-25062003><FONT face=Arial color=#0000ff
size=2>Sub StartTimer()<BR> lngStartTime =
apiGetTime()<BR>End Sub<BR>Function RawTime() As Long<BR>
RawTime = apiGetTime()<BR>End Function<BR>'*-Class function / sub
declaration<BR></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<P><FONT size=2>John W. Colby<BR>www.colbyconsulting.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Rocky
Smolin - Beach Access Software<BR><B>Sent:</B> Tuesday, June 24, 2003
12:08 AM<BR><B>To:</B> AccessD@databaseadvisors.com<BR><B>Subject:</B>
[AccessD] Time in milliseconds<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Dear List:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is it possible to access/store/display the
time in increments smaller than seconds. I need to time something in
fractions of a second.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MTIA</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky</FONT></DIV>
<DIV> </DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>