Cathy-- I realize we're going backwards here due to posting asynchronicities, but I'll try to answer anyway. The code you showed below is a fairly good way to achieve the progress bar result without using the Microsoft Progress Bar control. "Question 1: what do I put in the (currentamt, totalamount) slots below?" When you call the 'updatemtr' routine, you pass it two figures: the current amount and the total amount. That is, if the total amount were to be a dollar, and when you called it you were up to 45 cents, you'd call it like this: Updatemtr(0.45, 1.00) "Question 2: how does my meter know when to run?" It doesn't; you have to tell it. You can either call it via Timer (as the author suggested), or when you're stepping through your recordset or other looping piece of code. "How do I add this to correspond with the on click property of the run query button" In whatever bit of processing you're going to do when you click your button, you'd call the author's routine. "if I have 2 update buttons to run 2 main update queries, how will it know which one to run against and how do I tell it when/how long to run?" You could try running two progress bars, but that might confuse more than help. I would simply run the meter against whichever query normally took the longest to execute. Funny thing about us humans: even though creating, updating, and closing a progress bar of any type actually adds time to the length of the task being performed, we perceive it as being finished quicker. An impatient lot, aren't we? --Jim -----Original Message----- From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of Cathy.Evans@xxxxxxxxx Sent: Wednesday, March 10, 2004 10:14 AM To: mso@xxxxxxxxxxxxx Subject: [mso] Re: ACCESS 2002: Pop Up Message When Make Table Query Complete Jim, the sample progress bar databases I'd found didn't go down very well in transposing them so I started looking for more ideas. Found these instructions on the web, have followed them and have 2 questions to finalize: Question 1: what do I put in the (currentamt, totalamount) slots below? Question 2: how does my meter know when to run? How do I add this to correspond with the on click property of the run query button, and if I have 2 update buttons to run 2 main update queries, how will it know which one to run against and how do I tell it when/how long to run? (lots of questions rolled up into #2!) Thank you again! INSTRUCTIONS: 1. Create a label control, with a sunken style, (we'll call this lblbase) and make it's back color transparent, and fore color to black. 2. Create a label control, of 0.00 width, identical in height to the lblbase (we'll call this lblmeter); align the lblmeter exactly with the left edge of the lblbase control, and send it to the back (i.e. behind the lblbase.) Make its edges transparent. 3. To update the progress meter place the following code in the form's module and send it the current and total amounts to measure progress as appropriate (you can use a timer event or place the calls in looping code etc.): Sub updatemtr (currentamt, totalamount) ' This function changes the color based on progress. ' You set the back color of lblmeter to be a single color if desired. Dim MtrPercent as Single MtrPercent = currentamt/totalamount Me!lblbase.Caption = Int(MtrPercent*100) & "%" Me!lblmeter.Width = CLng(Me!lblbase.Width * MtrPercent) Select Case MtrPercent Case Is < .33 Me!lblmeter.BackColor = 255 'red Case Is < .66 Me!lblmeter.BackColor = 65535 'yellow Case Else Me!lblmeter.BackColor = 65280 'green End Select End Sub 4. Note this same tip can also be used to create a simple horizontal bar chart on a report, and is especially handy if you don't know what the total amount might be before you run the report. (The total amount would be required to be known a priori if you were to use MS Graph to create the chart, because you would have to set the scale when creating the chart; with this method, you don't have to know the total amount before the report is run.) "Jim Pettit" <j_e_pettit@hotmail To: <mso@xxxxxxxxxxxxx> .com> Sent by: cc: mso-bounce@freelist s.org Subject: [mso] Re: ACCESS 2002: Pop Up Message 03/09/2004 06:02 PM When Make Table Query Complete Please respond to mso .... Cathy-- On some of the higher-quality (read: better-paying) projects on which I've worked, I've created a form which pops up, runs some type of timer-based animation, then disappears when the query has completed. When I've used dynamic SQL statements built in code in which I'll be stepping through a recordset, the pop-up will display a progress bar control rather than an animation. Neither is difficult to do, and users seem to like them. I don't know if that's the BEST way; the built-in Access status bar will show query progress if you want it to, for instance. But this has worked for me. --Jim ------------------------------------------------------------------------ ----------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ------------------------------------------------------------------------ ------------------------------- ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in the subject line. Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles ************************************************************* ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in the subject line. Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles *************************************************************