[AccessD] Timer Event

Drew Wutka DWUTKA at Marlow.com
Thu Jun 19 13:00:31 CDT 2008


Well if you put DoEvents on every other line, your timer event should
fire at a more consistent interval.  Of course, if you have a single
line of code which takes longer then 1/4 second, then it would pause
until that line was done.  1/4 second 'progress' updates seems a bit
much though....if your process takes 60 seconds, you're running update
progress code 240 times.

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 12:38 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Timer Event

I actually implemented #2 - works great - I add a period to a string of
periods in a module that displays the string in a text box on the
calling
form.  Then I can just intersperse calls to that calculation function at
random.  Problem is that the periods don't get added in equal time
intervals. The first couple take a long time.  The last few come out
real
fast.  User wants them equal intervals.  So I said we can play with
lacing a
few more calls through the code.  He wants it different.  So I'm casting
about. 

This will be a commercially distributed product eventually so I'd like
to
keep it as clean as possible. 


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com
 
 

-----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

No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.4.0/1509 - Release Date:
19/6/2008
08:00

-- 
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.





More information about the AccessD mailing list