Help Adjusting the Update Piece of Access VBA Code
Hello Experts - The code below is working perfectly, however there has been a change in rules and an adjustment to the code is needed.
I need to adjust this With statement so that if there is only 1 record returned in the recordset, the bytPoints value for that record is 5 instead of 10.
Dim bytPoints As BytebytPoints = 10strSQL = strSQLbr1With CurrentDb.OpenRecordset(strSQL, dbOpenDynaset) Do Until .EOF .Edit If !RCER_TotalTime = 100 Then !RCER_Points_AG = 0 .Update End If If !RCER_TotalTime < 100 Then !RCER_Points_AG = bytPoints .Update End If If bytPoints > 0 Then bytPoints = bytPoints - 1 .Edit: !RCER_Rank_AG = .AbsolutePosition + 1: .Update .MoveNext LoopEnd With
https://www.experts-exchange.com/questions/27115570/Update-Table-Field-Counting-Backwards-from-10.html