Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bars

Status
Not open for further replies.

ronmon

IS-IT--Management
Feb 25, 2002
66
0
0
IE
Can anyone please explain to me how to use a progress bar properly. What i would like to do is have a progress bar load as a form loads up or as a search is taken place

 
I believe there is an active x object for this, but I've never had any luck with that.

I always create a rectangle with color filled to whatever, with a smallish width, and as my query runs or my form loads, I increase the rectangles width until the action finishes, and I set the rectangle to invisible, or move to my next form.

Hope this helps.
 
Ya that sounds the biz how do you link you width of the rectangle to the position the form is in while loading

 
CHeck out the syscmd options.




strMsg = "Deleting data from <application> for " & Trim(GetAcctMUName(cboDist)) & " Year " & cboYEar & " Month " & cboMonth
varReturn = SysCmd(acSysCmdInitMeter, strMsg, 0)
varReturn = SysCmd(acSysCmdUpdateMeter, 0)


DB1.Execute SQLTEXT, dbSQLPassThrough

varReturn = SysCmd(acSysCmdClearStatus)

 
The Active X control that is a Progress Bar that you can put on a form (as compared to using the built in progress bar at the bottom of your Access window)is called 'Microsoft ProgressBar Control, version 6.0'. (I have Access 2000). You can get it from your toolbox, click on the hammer and wrench icon and scroll down until you find it. Once you have this control on your form, you can easily program it to show more 'clicks' in it depending on how far along your procedure is.

Hope this helps.
 
Sorry Ronmon.
In my example, the visible property of the rectangle is set to No, but when the query begins I set its visible property to Yes.
As far as positioning, I've always included it below whatever criteria I enter for my query.
I also create a text box that says "Please wait...generating report." or something like that just above the progression bar. Like the rectangle, I keep it hidden until the query begins and I make it visible, but then return it to its hidden state once the query has completed.

Hope this helps.
 
Ronmon,

To test this method and see the progression, try creating a rectangle and a command button on a form and enter this code in the command button On Click event. Rememeber to change "YourBoxName" to your object's name.

MsgBox ("Level1")
Me.YourBoxName.Width = 250
MsgBox ("Level2")
Me.YourBoxName.Width = 500
MsgBox ("Level3")
Me.YourBoxName.Width = 750
MsgBox ("Level4")
Me.YourBoxName.Width = 1000

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top