N
ndunwoodie
Can someone tell me why this code never moves beyond the first record?
Dim strSQL As String
rst.Open "tblStaff", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
Do While Not rst.EOF
strSQL = "Update tblStaff " & _
"Set datStartDate = DateAdd('d', 1, datStartDate)" & _
"WHERE UCASE(txtQual) = 'X'"
CurrentDb.Execute strSQL, dbFailOnError
rst.MoveNext
Loop
Dim strSQL As String
rst.Open "tblStaff", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
Do While Not rst.EOF
strSQL = "Update tblStaff " & _
"Set datStartDate = DateAdd('d', 1, datStartDate)" & _
"WHERE UCASE(txtQual) = 'X'"
CurrentDb.Execute strSQL, dbFailOnError
rst.MoveNext
Loop