473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Progress bar freezes when table is too large

This is Access 2010, Windows8.1. I made a text box progress bar on a form that widens as the records move to the next one. The progress bar works fine with 600 records and freezes with about 900 or less records. (Those are my test records.) My full table is over 9,000 records and the bar (and record bar that shows each record being processed) freezes for over a minute, then suddenly the progress completes and the bar goes to the end and the record bar also shows the end count. In effect, Access freezes for the period of time needed to complete moving through the records. What I need is for the same gradual progress bar widening to show the program is still working. Records are being processed, but the progress does not show because the visual part of the process stops somehow. Would appreciate any ideas what is going on and possible alternatives. Right now, I'm just trying to set up the progress bar that works with any number of records.

Code for the progress bar-
Expand|Select|Wrap|Line Numbers
  1. While CurrentRecord < RecordCount
  2.  
  3.  Counter = Counter + 1
  4.   If (Counter = Blocks) Then
  5.  
  6.      If (Percent = 1) Then
  7.                 FormProgressBarContinuous.Text26.Width = 100
  8.             ElseIf (Percent = 2) Then
  9.                 FormProgressBarContinuous.Text26.Width = 400
  10.             ElseIf (Percent = 3) Then
  11.                 FormProgressBarContinuous.Text26.Width = 700
  12.             ElseIf (Percent = 4) Then
  13.                FormProgressBarContinuous.Text26.Width = 1000
  14.             ElseIf (Percent = 5) Then
  15.                FormProgressBarContinuous.Text26.Width = 1300
  16.             ElseIf (Percent = 6) Then
  17.                FormProgressBarContinuous.Text26.Width = 1600
  18.             ElseIf (Percent = 7) Then
  19.                FormProgressBarContinuous.Text26.Width = 1900
  20.             ElseIf (Percent = 8) Then
  21.                FormProgressBarContinuous.Text26.Width = 2200
  22.             ElseIf (Percent = 9) Then
  23.                FormProgressBarContinuous.Text26.Width = 3000
  24.             End If
  25.  
  26.           Percent = Percent + 1
  27.           Blocks = Blocks + MinBlock
  28.  
  29.         End If
  30.  
  31.     DoCmd.GoToRecord , , acNext
  32. Wend
Jul 20 '15 #1
1 1018
jimatqsi
1,271 Expert 1GB
You might get what you want by adding a DoEvents at the bottom of the loop.

But i would get rid of all the If / Elseif and use instead
Expand|Select|Wrap|Line Numbers
  1. FormProgressBarContinuous.Text26.Width=Percent * maximumWidth/100
to automatically set the size of the progress bar. You will have to plug in what the maximum width is. It should 1440 * the number of inches wide the bar is.

Also, see my article http://bytes.com/topic/access/answer...t-progress-bar.

Jim
Jul 20 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe Bloggs | last post by:
I have a Windows form application that has a start button, a progress bar and also writes information to the status bar the code is C#. My problem is that when you hit the start button and the...
5
by: BVM | last post by:
Hi: I have a problem when sending large email(more than 20Mb) from a web page. I got timeout error. How to overcome this problem? I am thinking to have a thread to send email. Once the thread...
0
by: vijay | last post by:
Hi, I have an ASP.NET application running on a multi-processor Windows 2003 server. The application has been behaving perfectly well for the last couple of months. Yesterday, we started...
0
by: D Brown | last post by:
Does anyone know why my .NET development would hang / freeze when performing a Global Find / Replace on all files? I have a large ASP.NET VB Application. I have left the machine for 24 hours but...
14
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe...
4
by: Joachim | last post by:
Is there an efficient way of copying a file and at the same time updating a progress bar with short intervals to see how much is still to copy of the file? Like some FTP programs have for instance.
1
by: =?Utf-8?B?RG9hbiBOZ3V5ZW4=?= | last post by:
My application is written in VB.NET 2005 to display a table of a SQL 2005 in a datagrid. I want to be notified or capture events when table data changed (inserted, deleted, updated by another user)...
1
by: James McGill | last post by:
Hi All, I'm using subprocess.Popen to run a C++ compiler and have set stdout = PIPE. The exact line of code that I am using is: process = Popen(command, stdout=PIPE) status = process.wait() ...
0
by: wtzolt | last post by:
Hi, I've made a small program which has 2 buttons and each does certain thing. Here's a simplified version of the code. Thing is it works fine except that the button freezes and stays in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.