Hi all, I have a form that has a progress bar that I'm trying to use in my workflows. This one doesn't track record counts like the ones posted in the forum already (which i took bits from) but which step in the workflow the system is currently on. The code so far looks like this:
Code:
Public Function ProgressBar(varAmt As Variant, varTotal As Variant)
Dim ProgPerc As Single
ProgPerc = varAmt / varTotal
If ProgPerc <= 1 Then
Forms!frmProgressBar!lblProgressPerc.Caption = "Step " & varAmt & " of " & varTotal
Forms!frmProgressBar!lblProgressMeter.Width = CLng(Forms!frmProgressBar!lblProgressPerc.Width * ProgPerc)
Else
End If
Select Case ProgPerc
Case Is < 0.5
Forms!frmProgressBar!lblProgressMeter.BackColor = 255
Case Is < 0.75
Forms!frmProgressBar!lblProgressMeter.BackColor = 65535
Case Else
Forms!frmProgressBar!lblProgressMeter.BackColor = 65280
End Select
If ProgPerc > 1 Then
Forms!frmProgressBar!lblDone.Visible = True
Forms!frmProgressBar!cmdExit.Visible = True
End If
End Function
Currently, the "Step # of #" is working fine as is the showing of the "done" and command button. However, The progress bar itself is not expanding. Not quite sure what I'm doing wrong. Help?