NSNewey . . . . .
Don't know if you'll need this or not, but decided to post it anyway.
There are three main operational attributes for a Progress Bar:
[purple]
Min[/purple], which defaults to zero and usually needs no setup.
[purple]
Max[/purple], the full count of the bar, usually set by the programmer . . . AKA . . . You!
[purple]
Value[/purple] (and the most important), the current value of the bar, >= min & <= max that is [purple]
setup/enumerated by you![/purple]
To setup the Form & ProgressBar, in a new form in design view, on the menubar click Insert - ActiveX Control..., scroll to and select [blue]Microsoft ProgressBar Control, version 6[/blue]. Click OK.
Size the bar to your liking then, right-click the bar - [blue]ProgCtrl Object[/blue] - [blue]Properties[/blue]. At the bottom you'll see the combobox for the [blue]Scrolling[/blue] property. Select [purple]
Smooth[/purple]. Click OK.
Now set the following properties for the form:
[blue]ScrollBars [purple]
Neither[/purple]
Record Selectors [purple]
No[/purple]
Navigation Buttons [purple]
No[/purple]
Auto Resize [purple]
Yes[/purple]
Auto Center [purple]
Yes[/purple]
Border Style [purple]
Dialog[/purple]
Min Max Buttons [purple]
None[/purple]
Caption [purple]
Empty/No Value[/purple]
PopUp [purple]
Yes[/purple]
Modal [purple]
Yes[/purple][/blue]
Save/close the form
Use the following to open the form:
Code:
[blue] DoCmd.OpenForm "YourFormName"
DoEvents [green]'Allows ActiveX Control to fully refresh.[/green][/blue]
The following is an example of opening, enumerating, and closing the form:
Code:
[blue] Dim frm As Form, ctl As Control, n As Long
DoCmd.OpenForm "[purple][b]ProgressBarFormName[/b][/purple]"
DoEvents [green]'Allows ActiveX Control to fully refresh.[/green]
Set frm = Forms![purple][b]ProgressBarFormName[/b][/purple]
Set ctl = frm![purple][b]ProgressBarName[/b][/purple]
frm.Caption = "Down Loading Data!"
ctl.Max = 1000 'Set max count for the bar
[green]'Sample enumeration. Your enumeration code would go here.[/green]
For n = 1 To 1000
ctl = n
Next
DoCmd.Close acForm, "[purple][b]ProgressBarFormName[/b][/purple]"
Set ctl = Nothing
Set frm = Nothing[/blue]
See Ya! . . . . . .