473,406 Members | 2,816 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,406 software developers and data experts.

Progress bar

284 100+
i am using vb6

i have a follwing code which insert data into the table

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. ‘ Note fromint and toint can be any interger like 10000 -12000 inputed by user
  4.  
  5.  
  6.  
  7. For a = fromint To toint
  8.  
  9. Dim numberstr As String
  10.  
  11. Dim numbercmd As Command
  12.  
  13. Set numbercmd = New Command
  14.  
  15. numberstr = "INSERT INTO invtemp    ([Invoice No]) VALUES     (" & a & ")" ‘There are more field but I remove them to simplify it
  16.  
  17. numbercmd.ActiveConnection = con
  18.  
  19. numbercmd.CommandText = numberstr
  20.  
  21. numbercmd.Execute 
  22.  
  23. End If
  24.  
  25.  
  26.  
  27. Next a
  28.  
  29.  

the code is working fine and now i want to add a progrss bar to it so i can show user how much time it takes
proviosly i have no experien using a progress bar

i had try it my making like this

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. ‘ Note fromint and toint can be any interger like 10000 -12000 inputed by user
  4.  
  5.  
  6.  
  7. ProgressBar1.Min = fromint
  8.  
  9. ProgressBar1.Max = toint 
  10.  
  11. For a = fromint To toint
  12.  
  13. Dim numberstr As String
  14.  
  15. Dim numbercmd As Command
  16.  
  17. Set numbercmd = New Command
  18.  
  19. numberstr = "INSERT INTO invtemp    ([Invoice No]) VALUES     (" & a & ")" ‘There are more field but I remove them to simplify it
  20.  
  21. numbercmd.ActiveConnection = con
  22.  
  23. numbercmd.CommandText = numberstr
  24.  
  25. numbercmd.Execute
  26.  
  27. ProgressBar1.Value = ProgressBar1.Value + 1
  28.  
  29. End If
  30.  
  31.  
  32.  
  33. Next a
  34.  
  35.  


but it is giving me error on minimum value

how to slove this
Jun 30 '08 #1
3 910
QVeen72
1,445 Expert 1GB
Hi,

Slight Tricky over here...
Always For progressbar, Max value should be Greater than Min, Or else, it errorrs..
So you need to reverse the condition... First Set Max and then Min, or First set Min =0

ProgressBar1.Min = 0
ProgressBar1.Max = 12000
ProgressBar1.Min = 10000


Regards
Veena
Jun 30 '08 #2
muddasirmunir
284 100+
OK I will try it like this by reversing it



Hi,

Slight Tricky over here...
Always For progressbar, Max value should be Greater than Min, Or else, it errorrs..
So you need to reverse the condition... First Set Max and then Min, or First set Min =0

ProgressBar1.Min = 0
ProgressBar1.Max = 12000
ProgressBar1.Min = 10000


Regards
Veena
Jun 30 '08 #3
muddasirmunir
284 100+
Thanks its now working properly
Jun 30 '08 #4

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

Similar topics

3
by: SpamProof | last post by:
I got an animated gif that is a barber pole spinning that I want to use as a progress bar. The problem is that is stops spinning (shows 1 frame) when my browser is processing a submited request...
7
by: Pepi Tonas | last post by:
I have a form that takes some time to load because it has to populate some Data. I was trying to display a form on top of it with an activity bar so that user can see that something's going on. ...
1
by: scorpion53061 | last post by:
this code came from cor and I think Armin authored it. I am trying to download an access database and track its progress. It is reading the size fo the file but I am unsure of how to get the...
8
by: Brian Henry | last post by:
I created a smooth progress bar with this code.. but if you update the values in a row quickly of it and watch it on screen it flickers... how would i change this to reduce the flickering?...
8
by: WhiteWizard | last post by:
I guess it's my turn to ASK a question ;) Briefly my problem: I am developing a Windows app that has several User Controls. On one of these controls, I am copying/processing some rather large...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
15
by: eladla | last post by:
Hi! I am creating a composite control the does some of it`s own data access. I want to display a progress bar between the time the page is loaded and the control place holder is displayed and...
5
by: Aggelos | last post by:
Hello I am doing sevreral scripts like sending a newsletter that might take a while to finish first to prevent the browser from timing out and to keep the user informed of the process progress I...
1
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a...
0
by: jags_32 | last post by:
Hello We use MFG-PRO as our ERP system which in turn uses Progress databases. In the old version of SQL 2000, using DTS packages, we used to set the code page via command prompts and execute DTS...
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
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.