Gustav Brock
Gustav at cactus.dk
Sat Jun 21 01:36:56 CDT 2008
Hi Rocky As someone else suggested, invent your own increments. I just put in lines with a Debug.Print Timer around the code to get an idea of where a piece of code eats time. As said, the important part is that the user can see the bar moving to indicate the app is not frozen. As for the percentages - which can increment in irregular steps - we just tell the users that the percentage indication is not related to the total processing time but for the work done by the process(!) No one knows, but who can tell if the last 10% of "work" shouldn't eat 40% of the total time? /gustav >>> rockysmolin at bchacc.com 21-06-2008 01:03 >>> Gustav: That will work if I can figure out the number of iterations and where they occur. This is a rather complex piece of code and has lots of phases and loops within the phases. 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 Gustav Brock Sent: Friday, June 20, 2008 9:19 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Timer Event Hi Rocky Another suggestion: http://msdn.microsoft.com/en-us/library/aa188220(office.10).aspx Chapter 9 Excerpt: Create a Generic, Reusable Status Meter /gustav -----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