[AccessD] Timer Event

Jim Lawrence accessd at shaw.ca
Thu Jun 19 14:23:57 CDT 2008


Hi Drew and Rocky:

Cheat; is my suggestion as a timer consumes a lot of resources. MS uses this
method when loading apps or doing system changes as no real indicator is
accurate particularly when a series of complex events are taking place. MS
also uses the infamous flexible timed process like when copying files. The
indicator keeps adjusting the projected time of completion and only when the
event is within seconds of the end is an accurate time displayed.

You could go so far as to project a theoretical completion time...
  
Jim 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Thursday, June 19, 2008 9:47 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Timer Event

Unfortunately, Access VBA is single threaded, so while code is running,
it has control.  The only way to let something else happen is to
intersperse 'DoEvents' lines into your calculation process, which will
release the thread to run any waiting events (which would allow your
timer to fire).

Two options I can think of for your situation.

#1.  Cheat.  Create an .avi of a 'progress bar' and run it before your
calculation starts up.  The animation should run regardless of what your
code is doing.  Of course, it would be no real indication of the actual
process.

#2.  Give an actual indication.  Is there some determination of how far
the calculation has progressed?  Why not give a progress of the actual
progress, and give a 'pause/stop' option too?  All possible with
DoEvents.  To be more specific, I would need more details on this
'calculation'.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
at Beach Access Software
Sent: Thursday, June 19, 2008 11:24 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Timer Event





 Dear List:
 
The client would like a progress box to display during a lengthy
calculation
- can take up to a minute and I told him that some kind of indication
should
appear on the form so the user knows something is happening.
 
I implemented one solution which is OK.  I have a sub which adds a
period to
a text box on the calling form.  And so I can lace calls to that routine
throughout the calculations.  Problem is that it doesn't produce these
periods in equal time intervals.
 
So what he really wants now is a progress indicator that would change
every
1/4 second or so, and when it got to its maximum length would start over
again.  Not a difficult thing to do. 
 
I thought I could use the timer event on the form that calls the
calculation, but the calculation is in a Public module and so, while it
is
running, the timer event doesn't trigger. 
 
Is there a way around this or another approach?
	
MTIA

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 

 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the
person or entity to which it is addressed and may contain II-VI Proprietary
and/or II-VI Business Sensitive material. If you are not the intended
recipient, please contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy. You are notified that any
review, retransmission, copying, disclosure, dissemination, or other use of,
or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list