Progress bar conditional issue

hi,
I'm using the following code to two things. First, progress bar and second, database connection. Both process are working fine but, not simultaneously.
Code:
================
On Error GoTo Err_cmdDisconnect_Click
    Dim dbs As DAO.Database
    Dim tdf As DAO.TableDef
    Dim strMessage As String, strDatabaseName As String
    Dim retval
    Dim FullLength As Integer
    Dim PercentComplete As Integer
    Dim Timing As String
Set dbs = CurrentDb()
strDatabaseName = CurrentProject.Path & "\BE\" & Dbase
If IsNull(Dbase) Then
    MsgBox ("Please select the database."), , "Error"
    Me.Dbase.SetFocus
Exit Sub
End If
    strMessage = "Are you sure to connect " & _
    strDatabaseName & " as the Auto Evolution database?"
If MsgBox(strMessage, vbYesNo + vbQuestion, "Connection Confirmation") = vbNo Then
Exit Sub
End If
If Dir(strDatabaseName) = "" Then
    MsgBox "The Auto Evolution database you have specified as the " & _
    "source was not found.", vbInformation, "Connection Error"
Exit Sub
End If
DoCmd.Hourglass True
'Declare timing
Timing = 0.01
'Declare the maximum length of the progress bar
FullLength = 8050
'Hourglass
Screen.MousePointer = 11
    'Remove transparancy of progress bar
If Me.txtProgress.Width <> 0 Then
    Me.txtProgress.BackStyle = 1
End If
Do While Me.txtProgress.Width <> FullLength
    Me.txtProgress.Width = Me.txtProgress.Width + 25
    PercentComplete = (Me.txtProgress.Width / FullLength) * 100
    Me.txtStatus.Caption = PercentComplete & " % Complete"
    Call Pause(Timing)
Loop
If Me.txtProgress.Width = FullLength Then
    Me.CmdClose.Enabled = True
End If
    retval = SysCmd(acSysCmdSetStatus, "Connecting to previous Database")
For Each tdf In dbs.TableDefs
    If tdf.Connect <> "" Then
    tdf.Connect = ";DATABASE=" & strDatabaseName & (";PWD=zujan")
    tdf.RefreshLink
End If
    Next tdf
Screen.MousePointer = 0
DoCmd.Hourglass False
retval = SysCmd(acSysCmdClearStatus)
MsgBox "Auto Evolution database is now connected with " & _
        "'" & Me.Dbase & "'", vbInformation, "Connection Successful"
DoCmd.Close acForm, Me.NAME
Exit_cmdConnect_Click:
    Exit Sub
Err_cmdConnect_Click:
    DoCmd.Hourglass False
    If Err.Number <> 2467 Then
    MsgBox ("Unable to execute database switch now."), vbCritical, "Error"
    Me.CmdClose.Enabled = True
    Resume Exit_cmdConnect_Click
End If
===============
Any help will be appreciable.
Thanks & Regards, Anuj Mehrotra

Do While Me.txtProgress.Width <> FullLength
    Me.txtProgress.Width = Me.txtProgress.Width + 25
    PercentComplete = (Me.txtProgress.Width / FullLength) * 100
    Me.txtStatus.Caption = PercentComplete & " % Complete"
    Call Pause(Timing)
Loop
If Me.txtProgress.Width = FullLength Then
    Me.CmdClose.Enabled = True
End If
    retval = SysCmd(acSysCmdSetStatus, "Connecting to previous Database")
For Each tdf In dbs.TableDefs
    If tdf.Connect <> "" Then
    tdf.Connect = ";DATABASE=" & strDatabaseName & (";PWD=zujan")
    tdf.RefreshLink
End If
    Next tdf
Screen.MousePointer = 0
Hi Anuj,
What I see in your code is that you first have your progress bar run from 0 to 100%, and after that step through the TableDefs to connect.
I assume you want to increase the progress bar during the connecting process. So you have to merge the two loops. First you count the total number of TableDefs (your 100%), and then increment Me.txtProgress.Width for each tdf in equal steps.
Instead of building the progress bar on "each" form, you could also make a dedicated progress bar form. At the start of a loop you open the form, and assign the form to an variable of type form (e.g. progr_form):  Set progr_form = Forms("Progress_form").
This form has the control txtProgress to display the progress bar, a (hidden) control with the maximum number of steps, and a (hidden) control with the current number of executed steps. After the update of this latter control (e.g. progr_form!CurrentCount
= x), the width of the progress bars is recalculated. After finishing the loop, the form is closed.
The advantage of a dedicated progress bar form is that you can use the same form for quite different progress displays, under quite different circumstances.
Imb.

Similar Messages

  • Progress bar update issue

    I have a flash program written in Action Script 3.  It worked fine on XP but I recently moved to windows 7 and now I have problems.  It is a simple file upload program.  In Windows 7 the progress moves really fast to 100% like it is reading a buffer and not what is being sent over the internet.  Once it reaches 100%, the program hangs (sometimes hangs the browser) until the file has finished uploading.  The program still works in XP so is this a known issue with Windows 7?  I haven't found any other problems with this online anywhere.
    Thanks

    Thanks for your response.  It isn't Adobe Flash that is the problem, I think that it is the way the flash program is interpreted in IE/Firefox on Windows 7.  The line of code I use to update the progress bar is progressBar.setProgress(event.bytesLoaded, event.bytesTotal); (after I have set a progress handler)  Like I said, the same flash application runs great on Internet Explorer/Firefox on XP but not on Windows 7 and my flash player is up to date.  Also, on Win7 you can't run IE in compatibility mode either...
    Thanks for you time.

  • Gray Boot Screen with progress bar & SMC Issues

    Hi All,
    Over the last few days I've experienced the grey boot screen with progress bar three separate times after the finder froze and I was forced to manually reboot my imac. Previously I have only seen this during a Firmware update.
    I am also concerned about the Finder freezing. It has been happening when I've been trying to access any of my external hard drives at random intervals (connected via usb, and f800). I am concered that my SMC controller might be failing as these drives are testing fine on other computers and in drive test programs. Also, the f800 drives have been self unmounting.
    I had my internal drive replaced by apple a few weeks ago, could they have somehow damaged the smc controller unintentially? Or is this simply a Snow Leopard hiccup? (I'm running 10.6.2). I'm really starting to get annoyed with having to hard reboot or constantly reset my SMC. Any ideas before I take it in to a store?
    Thanks!
    Message was edited by: fkick1

    I have found other users have this same problem when using windows. My setup worked fine until I did a windows update. Now apple partition is inaccessible. Guess the windows update whacked the apple partition. Apple should have a workaround. Bad Windows!

  • Progress Bar visibility issue

    I'm a bit of a newbie when it comes to components, but I'm
    hoping there's an easy answer that I'm simply missing.
    I have 4 nested files, the first and third of which are files
    that contain sections of loadable content (menu pages,
    essentially). I've followed some simple tutorials about how to make
    the progress bars disappear once a file completely loads and all
    seemed to be working fine when I previewed the third file (a
    sub-menu) in the chain, but when I previewed the first file (the
    main menu), the progress bars that were working as they should the
    third file are still visible once its respective files load.
    The error only seems to take place in the first file and only
    in relaton to the progress bars in the third file, although the
    parameters and actionscript for all the progress bars follow the
    same formula. Is there a reason why a progress bar that disappears
    in one file remains visible in a file further up the chain and if
    so, is there any way to correct this?

    Do While Me.txtProgress.Width <> FullLength
        Me.txtProgress.Width = Me.txtProgress.Width + 25
        PercentComplete = (Me.txtProgress.Width / FullLength) * 100
        Me.txtStatus.Caption = PercentComplete & " % Complete"
        Call Pause(Timing)
    Loop
    If Me.txtProgress.Width = FullLength Then
        Me.CmdClose.Enabled = True
    End If
        retval = SysCmd(acSysCmdSetStatus, "Connecting to previous Database")
    For Each tdf In dbs.TableDefs
        If tdf.Connect <> "" Then
        tdf.Connect = ";DATABASE=" & strDatabaseName & (";PWD=zujan")
        tdf.RefreshLink
    End If
        Next tdf
    Screen.MousePointer = 0
    Hi Anuj,
    What I see in your code is that you first have your progress bar run from 0 to 100%, and after that step through the TableDefs to connect.
    I assume you want to increase the progress bar during the connecting process. So you have to merge the two loops. First you count the total number of TableDefs (your 100%), and then increment Me.txtProgress.Width for each tdf in equal steps.
    Instead of building the progress bar on "each" form, you could also make a dedicated progress bar form. At the start of a loop you open the form, and assign the form to an variable of type form (e.g. progr_form):  Set progr_form = Forms("Progress_form").
    This form has the control txtProgress to display the progress bar, a (hidden) control with the maximum number of steps, and a (hidden) control with the current number of executed steps. After the update of this latter control (e.g. progr_form!CurrentCount
    = x), the width of the progress bars is recalculated. After finishing the loop, the form is closed.
    The advantage of a dedicated progress bar form is that you can use the same form for quite different progress displays, under quite different circumstances.
    Imb.

  • Mac boot issue; gray screen, spinning wheel, and progress bar

    Recently I shut down my Mac only to find when I tried turning it back on it was very slow and unresponsive. I proceeded to shut down a couple more times and this resulted in a gray screen upon startup with a spinning wheel, apple logo, and a progress bar. The progress bar did not fill at all at first, and as I left my laptop for about 40 minutes, it still hadn't moved. I proceeded then to boot in recovery and tried to repair my disk. This resulted in another issue, and would not repair, so I decided to just erase my HD, since there was not anything important on it anyways. I really just wanted my laptop to turn on so I could start my paper. Well it wouldn't erase my hard disk and this led to me becoming very impatient and just quitting the process. On the next attempt to boot in recovery, the hard disk doesn't even show up. Only the recovery disk (previously there were two disks as options, as well as the wifi selection). I'm now using safari through the recovery option. I'd like to simply get my computer back. If i can't get anywhere on here, i'm just going to bring it to the apple store and return it, most likely, as i've had nothing but problems with this thing. I've had it since the middle of September, and I can't hardly believe i've already encountered such an issue. Any help is much appreciated. Thanks.

    I'd make a trip to the Apple Store - your hard disk may be dying (the Recovery partition is very small) or there might be something corrupt in your system. They'll be able to evaluate it.
    Clinton

  • Issues with publishing my iWeb site to .MAC - Progress bar freezes at 100%

    Well, as topic says, i'm having troubles publishing my iWeb site to .MAC now since upgrading to '08. The progress bar reaches full circle, but then nothing. Left it uploading to .Mac for well over 2 hours one time while out of the house...nada. Sometimes i get an error message, sometimes not and have to close iWeb while it's still publishing.
    Any feedback regarding this?
    Thanks in advance.
    /Rich

    Update: After 36 hours, I have successfully managed to upload my entire website via the "Publish All to .Mac" option. I now have blue indicators on the left side of my iWeb program in place of those pesky red ones. How did I do it? Well, I'm not sure. But on my last attempt I looked at the problem from a different perspective, so I took an alternate approach. I had a feeling that I was experiencing a network timeout issue caused by a 3rd party software, so I created a Whitelist entry on my website filtering software that allows unlimited access to "idisk.mac.com";; and "web.mac.com";; domains. I've got two kids at home, so I'm running the free OpenDNS Dashboard service on my network which provides content filtering (blocks adult site, phishing site, etc..). I started using this service two weeks ago. My last website update was a week before that. I figured I had nothing to loose by trying. To my surprise, it worked. Now, it took almost two hours to publish, of which the pie indicator was in the  "filled" position for a nerve racking hour. To reconfirm,  I then made a minor change to one of the pages on my website and re-published. This time using the "Publish to .Mac" option in place of the ALL option and once again it worked. It took less than 5 minutes. Now, I'm not sure if this is a coincidence, maybe Apple fixed the problem, or maybe my website filtering service was causing some type of time out issue all along??  Don't know.. But at least for now, I'm a happy camper since I have my site up.

  • Recently my MacBookPro locked up on startup. Could not get past a certain point of progress bar. I had upgraded to Yosemite few weeks back, with no issues. I ended up doing a Recovery with Time Machine and I got all my apps, photos, documents, etc. back o

    Recently my MacBookPro locked up on startup. Could not get past a certain point of progress bar. I had upgraded to Yosemite few weeks back, with no issues. I ended up doing a Recovery with Time Machine and I got all my apps, photos, documents, etc. back okay --- except I got error messages that my "registration for Photoshop (I use CS4 Extended) and Photo Mechanic are no longer working".  I worked on Photoshop first, and tried (several times) to fix it with their online help suggestions.  Nothing worked.
    Is there a simpler way to "get my licenses/registrations back"???  I am also going to contact Camera Bits about the Photo Mechanic issues.   Thanks

    Same problem and for months now. I haven't been able to find a solution, but I suspect that's because I don't know exactly what's wrong.

  • Progress bar during startup - Odd Issue

    What's the problem:
    Upon startup my iMac (early 2009, Mountain Lion) shows a grey progress bar that takes approx. 20 Minutes to complete and then the machine shuts down.
    What have I done before the issue occured:
    Cleaning up cache files and deleting several programms that I wasn't using any more.
    What's the setup of my machine:
    I have one physical harddrive that contains 3 logical partitions: One is of course the Macintosh HD (HFS+), one for data (HFS+), and one Bootcamp (FAT32) partition.
    What have I tried so far:
    When booting into Single User mode I ran the fsck (and fsck_hfs) command which quits after 3 unsuccessfull attempts. The only error message shown is
    "Incorrect Number Of Thread Records (4, someNumber)". I tried this at least 10 times now and the behaviour is always the same, except from the number shown in the thread records message.
    When booting into the recovery partition disk utility shows me the 3 partitions on my HD but shows the Macintosh HD greyed out. When checking the HD it finished without problems, when just checking the Macintosh HD it aborts with an error. Same applies when I try to fix the partition.
    I tried to reinstall Mac OS but the Macintosh HD is not shown in the target disks for installation. I also tried to repartition the disk without any success.
    What's odd about this issue:
    First of all, I can boot into Windows (BootcamP) without any issues and work there.
    Also, when in singel user mode, I can run the 'du' command which shows me all files on my Macintosh HD so the partition itself still sems to be intact.
    What might be a solution:
    I've have come along some comments that said DiskWarrior could fix more issues then Disk Utility but I not yet there to spend 100+ € for it.
    Any other suggestions from you on how to get Mac OS back to work would be highly appreciated.

    Thanks for your replies and proposed solutions. Unfortunately none of them worked.
    @Alberto: Pressing the "D" button upon startup, does not launch the hardware test. Actually nothing realy happens for approx. 60 seconds before the machine starts the boot volume.
    @Linc: I'm not able to erase the OS X boot volume as disk utility tells me it's missing it's mount point.
    @romainst: As far as I remember I was still under 10.8.2. So far I have tried to repair the OS X partition at least 25 times without any changes or a chance to get this thing mounted.
    I wouldn't mind erasing the Mac OS partition and reinstalling it as it only holds systems files and some applications that I could easily reinstall. Still the machine is preventing me from doing so as it will not let me mount this partition. This is becoming increasingly frustrating as the only way out seems to erase the entire HD and start over from scratch - if this is possible at all. Despite the time wasted I would also loose some of my data on the respective partition as I don't have a backup for the entire data partition.

  • Progress Bar Issue Actionscript 3 Adobe Air Program

    I'm currently having an issue where when I download a file from the internet, I update the source for a ProgressBar that I've created, and I set the ProgressBar to event mode, and as the file is downloading, the progressbar's value increments as normal. When I re-download the same file (source has not changed), the value of the ProgressBar is no longer accurate or producing the same value as before. Basically, the ProgressBar works correctly only 1 time when I launch my application. Is there a proper way to reset/update the ProgressBar after each download?
    I've tried everything I can think of.

    Right if I had to paste the code it would take several pages lol. I haven't tried using a custom progress bar, but I may look into that. The main feature I used from the Progress bar was the ability to see how many "bytes" had been downloaded and I presented that to the user. I'm using a combination of urlStream/fileStream to download the file. And the source of the ProgressBar Component is linked to an instance called download which handles all the downloading of files. So I use the progress Event to monitor when a download is taking place, and at the same time calculate how many bytes have been downloaded. This is probably not the best way to do it, but currently the only way I know how with my limited actionscript 3 knowledge.
    I have confirmed at least my download class/package is downloading the full file each time even though my Progress bar only works 1 time, so it could be some of the things you pointed out that is causing it.

  • Animated Progress Bar issues

    I am working with the animated progress bar from the late Carl Backstrom's demo applicaiton but to my amazement, the bar refuses to animate unless the javascript is triggered from a button press. This is not really acceptable for my purposes as I need to have it fire and work though an onLoad on the body attributes. Any Sugestions? I know some people are going to probably say ExtJS and JQuery but our development rules here will not allow us include either of these libraries at this time.

    It is actually an intermediate page with a PL/SQL process that runs on submit to cache database information from a remote db. I actually have a button on another page that routes into the page in question so that I can clear everything in the background to prevent people from being able to go to another page while loading process is under way. The way I have it setup now is you click a button to start a multistage process and you are taken to a loading page which basically takes away other links on the page and gives you a blank page with the progress bar. Once loading is finished, it branches the person to the next step.

  • Issue Progress Bar

    Hello,
    I´ve got a Dashboard where the datas come from Web I and it are shown in a table in the Xcelsius, there is a Progress Bar (Unique Value) that i can change the values in the table when i move the bar but when i do that i can´t move the bar.
    it´s a little hard to explain. Does anybody know how to do it ?
    Thanks.

    Hi:
       Is the "Enable Interaction" under "Behavior" tab is enabled and checked?
       Or please create another process bar again, and make sure the "Enable Interaction" is checked and its data binds to cell with no formula.

  • When I try to empty trash, progress bar stops, and I have to reset finder

    This has been happening for about a week or so. Regardless of what the files are, I am unable to delete them. Whether I do a standard empty trash, or a secure empty trash, I end up with the same progress bar that stops during the process. I've let it sit for several minutes and over an hour, leaving me the only option of doing a force restart of finder.
    Currently I am unable to delete anything, putting a serious hold on my workflow.
    It appears that many people are having all kinds of trash issues with Snow Leopard. I'm assuming Apple is working on a fix, but I'm not sure when that's coming out. Until then, if there is some kind of work-around, I'd love to know about it.
    Any guesstimates on when Apple will release the next OS update?
    Cheers.
    Ben

    Start with http://www.thexlab.com/faqs/trash.html Do note that AFAIK, there aren't any trash issues with Snow Leopard, just the normal handful of common issues, usually fixed by the steps in the linked article.

  • ITunes store won't load. The progress bar freezes at about 50% and I get nothing but a white screen.

    I'm running iTunes 10.5 beta 7 but this issue has been happening since I was running 9.  One day I clicked on a link for an app I saw on techcrunch and it pulled up in iTunes as being in the UK store.  I clicked ok and my iTunes hasn't worked since.  I can log into my account but can't access anything in the store or Ping.  I've googled this issue and found some similar sounding stories but none of the solutions have worked.  I've uninstalled and reinstalled, turned of the itunes store in parental settings and checked "except for iTunes U", I've uninstalled apple aplication suport and installed safari and every other option I have found and nothing has worked.
    Sometimes if I let it sit long enough what looks like an unstyled version of the store comes up but is completely unusable.
    Just to be clear, this has been happening since before I was running any beta software or OS.
    Any help would be greatly appreciated.

    Thank you gchin.
    I emailed apple support and they got back to me, I did what he said and it's fixed! SOLUTION found- see below.
    I said:
    "I can't access the iTunes Store. When I click on it the progress bar stops at 50% and I'm left with a blank white screen (no error msg). I have uninstalled and reinstalled, run the iTunes diagnostics (it said all was ok), gone through all of the online help material and I've tried turning off my firewall. Nothing works. I can't sync my iphone either (stops on verifying iPhone so I think it's getting stuck on trying to contact the store). Plzz help."
    They replied:
    "Greetings from Apple iTunes Store Customer Support! I am ########.
    I understand that you have had issues accessing the iTunes Store. I know how eager you are to have this issue resolved. I will certainly assist you.
    #########, for this, I recommend that you attempt to resolve this issue by once again uninstalling iTunes and QuickTime, and then reinstalling the latest version of each. To do this, first ensure that you are logged in to an Administrator user account on your computer, then follow the instructions in the appropriate article:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista:
    http://support.apple.com/kb/HT1923
    Note: Titles you purchased from the iTunes Store or imported from CDs are saved in your iTunes folder by default and are not deleted by uninstalling iTunes. Backing up your iTunes Library regularly is recommended.
    After successfully uninstalling iTunes and QuickTime, please ensure you have upgraded to the latest Service Pack for Windows by installing all updates available to you on Microsoft Windows Update:
    http://update.microsoft.com
    Once you have the latest Service Pack for Windows installed, download and install iTunes for Windows (which includes QuickTime):
    http://www.apple.com/itunes/download
    If you continue to experience difficulty with this issue, you may wish to contact Apple technical support. A representative will be able to tell you about Apple's complimentary and fee-based support options and can help you determine which option might be most helpful.
    Please find the appropriate phone number here:
    http://www.apple.com/support/contact/phone_contacts.html
    Thank you for contacting iTunes Store Support. Have a nice day!
    Sincerely,"
    AND IT WORKED happy customer.

  • Gray progress bar on boot twice now

    I've experienced a gray bar on boot twice now. I upgraded to a 2011 MBP and transferred my 500 GB Toshiba SSD from last year's MBP into the new model, into the SuperDrive slot using a MCE OptiBay (I put the existing SSD into the OptiBay since the SuperDrive's SATA channel is 3Gbps and the Vertex III I have on order is 6Gbps and will use the system's primary SATA channel). The drive has worked flawlessly for a year, and Disk Utility reports no errors, but Googling the issue indicates that the gray progress bar appears when fschk is checking the drive. I've noticed that my wallpaper has been slow to appear on both occasions, defaulting to the OS X default for a few moments after I log in.
    I'm concerned that my drive is going bad, but cannot find any indication that this is the case beyond the intermittent gray progress bar on boot. At least one time after boot the progress bar occurred after a Software Update (Security and Safari). My system's logs also give me no indication what the problem might me. Here is one boot log that resulted in a gray progress bar - https://gist.github.com/922265.
    I'd appreciate any help on the matter. Thanks!

    I would expect either issue to produce a slow boot either time if either package were the problem. Both packages have been installed for a couple of yours without issue. Also, both apps produce these errors on normal boots as well. I wonder if the errors have to do with the fact that the applications weren't installed on the OS, rather they were already present after I put the old HD in the new system and "upgraded" the OS in place using the system disc that came with the new laptop in order to have the Sandy Bridge drivers installed.
    I was hoping you or someone might spot something slightly more definitive in the logs. The time gaps are definitely interesting to me. I think I'll see if I can turn on verbose logging and get any more telling information. Thanks for your help!

  • SAP BPC 7.5 Client, Silent install but with progress bar, can it be done?

    Hi All,
    I need to uninstall the BPC 7 Client and then deploy 7.5 to around 250 users accross the country.
    We have SCCM (SMS) in place so will be using that.
    I have the uninstall of 7 sorted and I have the response file etc sorted for the silent install of 7.5 and the install runs, silently, no issue.
    Is there a way though that one can "turn on" the progress bar during the install? So that users dont shutdown or disconnect in the 15min it takes the install to run.
    By way of example, in the SAP Business objects enterprise client on can configure the Silent install so that although it never prompts the user for a reponse there is a progress bar that runs, indicating that there is an install in progress.
    Thanks in advance,
    Bryan

    Hi Sebastian,
    No worries, I am using a pop up countdown so the users have some idea on progress. Would love to know why the install runs for over 15min.
    In the above case the uninstall was easy as we had deployed using MS AppV so it was just a case of deleting the advert in SCCM and the application was pulled from the users desktops.
    For 7.5 I am using a vbscript with following to uninstall:
    The install string pulled from the clients registry uninstall folder:
    RunCommand Chr(34) & "C:\Program Files\InstallShield Installation Information\{EC8753EF-EE78-48B5-A4D0-FBBD237B5D53}\setup.exe" & Chr(34) & " -runfromtemp -l0x0009UNINSTALL -removeonly"
    We create a custom link, so this deletes it.
    DeleteFile "c:\Users\Public\Desktop\SAP BPC 7.5.lnk"
    You should be able to create something similar for 7.0 & 7.1
    Hope that helps,
    Bryan

Maybe you are looking for