This is strange:
The error does only occur every other time I run my project.
Here is the code that is run:
Code:mConnection.Execute strUpdate, lngRecordsAffected, adCmdText If Not lngRecordsAffected = mrecCurrentSelection.RecordCount Then Debug.Print "DatabaseLayer.ChangePricesInCurrentSelectionWithFactor(): Didn't update all records in Current Selection!" End If ChangePricesInCurrentSelectionWithFactor = lngRecordsAffected mrecCurrentSelectionView.Resync mrecCurrentSelectionView.MoveFirst ParseRounding varRounding, lngAvrundningsregelId Dim lngRounded As Long While Not mrecCurrentSelectionView.EOF If Not IsNull(mrecCurrentSelectionView.Fields(strRoundPrice).Value) Then mrecCurrentSelectionView.Fields(strRoundPrice).Value = RoundMe(mrecCurrentSelectionView.Fields(strRoundPrice).Value, varRounding) mrecCurrentSelectionView.Update ' <---- The error occurs here End If mrecCurrentSelectionView.MoveNext If lngRounded Mod 50 = 0 Then DoEvents lngRounded = lngRounded + 1 Wend




Reply With Quote