Wasn't sure whether to post this here or in the forms cat. As it involves code, I chose here.
I'm trying to simulate a progress bar within a form using a textfield. I've found the following code on t'interweb but cannot get it to work. When I click the command button to start the progress bar nothing happens.
On the form load event I have:
Private Sub Form_Load()
Progress.Width = 0
Progress.BackColor = 16711680
On the command buttons click event I have:
Private Sub b_Go_Click()
Dim i As Integer, x As Double
Dim num As Integer, start As Double
num = 1000
x = 6237 / num
For i = 1 To num
start = Timer
Do While Time < start + 0.02
Progress.Width = i * x
num will, at some point, be the number of records which are querying but for interim is a dummy value for the sake of testing the thing works.
x is the width of the textbox (11cm) converted into twips.
Any ideas where I'm going wrong? No errors when debugging and I don't think I need any references for this to work.