T
tony
Hi,
I have a form where a user can update a lot of data, which once they
have finished will record the changes. Just to let the user know that
something was happening I had a progress meter appear. As the updates
are done through VBA and not running a query I am able to calculate
the number of records to be changed and thus update the progress meter
with 100th increments. I am using the MSComctlLib.ProgCtrl.2 Active X
progress bar 6.0.
This all works fine until the number of records being changed gets to
around 500 at which point it stops working. Let me clarify that bit -
if the user updates <500 fields then up pops the progress meter and
works great. If the user updates>500 fields then no progress meter at
all - even though the code runs perfectly.
So just to check this out I put a timer event on both the main form
and the progress meter form that would cause a box to flash every 1/2
second. Again this works perfectly until the user tries to update >
500 and then they stop until the code has run (on both the main form
and the progress monitor form). Once the code has run they come back.
My code for the update is below:
Do Until rstClone.EOF
Design_No = rstClone.Fields(1)
For Each fldClone In rstClone.Fields
If fldClone.Value <> rstNow.Fields(fldClone.Name).Value Then
pCount = pCount + 100 / tCount
'Keep user informed of progress by updating the progress
bar in the form frmSaving
If pCount <= 100 Then
'Update the progress bar
Forms!frmSaving.axPBar = pCount
'Try everything to get the progress bar to move!!!
Forms!frmSaving.axPBar.Requery
Forms!frmSaving.Refresh
End If
'Record changes in table History
RecHistory Design_No, fOSUserName, fldClone.Name,
fldClone.Value, rstNow.Fields(fldClone.Name).Value, Date & " " & Time
End If
Next
rstClone.MoveNext
rstNow.MoveNext
Loop
I did use the DoEvents call but this just crashed the whole thing.
Any ideas how to get this to work?
Tony
I have a form where a user can update a lot of data, which once they
have finished will record the changes. Just to let the user know that
something was happening I had a progress meter appear. As the updates
are done through VBA and not running a query I am able to calculate
the number of records to be changed and thus update the progress meter
with 100th increments. I am using the MSComctlLib.ProgCtrl.2 Active X
progress bar 6.0.
This all works fine until the number of records being changed gets to
around 500 at which point it stops working. Let me clarify that bit -
if the user updates <500 fields then up pops the progress meter and
works great. If the user updates>500 fields then no progress meter at
all - even though the code runs perfectly.
So just to check this out I put a timer event on both the main form
and the progress meter form that would cause a box to flash every 1/2
second. Again this works perfectly until the user tries to update >
500 and then they stop until the code has run (on both the main form
and the progress monitor form). Once the code has run they come back.
My code for the update is below:
Do Until rstClone.EOF
Design_No = rstClone.Fields(1)
For Each fldClone In rstClone.Fields
If fldClone.Value <> rstNow.Fields(fldClone.Name).Value Then
pCount = pCount + 100 / tCount
'Keep user informed of progress by updating the progress
bar in the form frmSaving
If pCount <= 100 Then
'Update the progress bar
Forms!frmSaving.axPBar = pCount
'Try everything to get the progress bar to move!!!
Forms!frmSaving.axPBar.Requery
Forms!frmSaving.Refresh
End If
'Record changes in table History
RecHistory Design_No, fOSUserName, fldClone.Name,
fldClone.Value, rstNow.Fields(fldClone.Name).Value, Date & " " & Time
End If
Next
rstClone.MoveNext
rstNow.MoveNext
Loop
I did use the DoEvents call but this just crashed the whole thing.
Any ideas how to get this to work?
Tony