I've managed to figure it out guys!!
So just before the merge starts, I've got this:
Dim n As Integer
n = 1
Then the merge loop starts:
For recordNumber = MergeStart To MergeFinish
And then just before "Next recordNumber", I now have
'Progress bar based on how many records in merge
If Me.OptionButtonAll.Value = True Or Me.OptionButtonCurrent.Value = True Or Me.OptionButtonFromTo.Value = True Then
Me.ProgressBar1.Value = Round(100 / MergeCountTotal * n)
Me.ProgressPercentage.Caption = Me.ProgressBar1.Value & "%"
End If
n = n + 1
This way it adds +1 to n just before it loops again. It's working perfectly now for calculating the correct percentage based on how many merge records it's processing. Thank f**k. This was driving me wild!
Thanks for your help though guys!
|