Jack and Pat
drawbridgej at sympatico.ca
Thu Jun 19 12:44:46 CDT 2008
Rocky, John Colby showed us a timer event a couple of years ago. It's an elapsed time thingy. Perhaps you could start your process; call his timer ; Do Events; add a Period after a certain time based on John's timer, repeat until process is completed. Just a thought. jack Here's John's email reference (email to Martin) ================================================ Martin, I have a timer class with a test db to demonstrate it. The only way to time the opening of the form is to place the timer init in the button click that opens the form since the load happens BEFORE the code in the form is loaded. Go to my site, click Misc Demos, then click C2DbTimerClass. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Martin Reid Sent: Monday, May 03, 2004 6:19 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access Timer I want to test the time taken to Open a form - get the load time Run a query - named query - get the time take to produce the results or a file or a report. We may also require the database to send an eal but that is covered. Would anyone have a function that measures such things? Martin -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -----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 1: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