Can I make the operation time of the Do While loop shorter?
Currently, on my lappy (PentiumM 1.7GHz), the loop takes 6.5 secs (average) to go through 480 records...
Currently, on my lappy (PentiumM 1.7GHz), the loop takes 6.5 secs (average) to go through 480 records...
Code:
Set fieldObject = rst.Fields(changeField)
Select Case changeOperator
Case "Add"
If fieldObject.Type <= 3 And IsNumeric(changeString) Then
StartTime = Timer
changeValue = CDec(changeString)
Do While Not rst.EOF
fieldObject.value = Round(fieldObject.value + changeValue, 2)
rst.MoveNext
Loop
MsgBox Timer - StartTime
rst.MoveFirst
Else
MsgBox "The selected field or input text is not a numeric data type."
End If
....and the rest doesn't matter
Last edited: