Hello--
Please see my current code below. It currently runs the DoWhile loop for ID=1 until ID=250000.
I would like to run the DoWhile loop starting at ID=250001 and ending at ID=500000. This needs to be done without altering the SQL.
Any ideas?
Public Sub fixData()
Dim rs As DAO.Recordset
Dim strSql As String
Dim lngNumber As String
strSql = "Select * from emp_id order by [ID]"
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)
Do While rs![ID] < 250000
If IsNull(rs![dot_one]) Then
rs.Edit
rs![dot_one] = lngNumber
rs.Update
Else
lngNumber = rs![dot_one]
End If
rs.MoveNext
Loop
End Sub
Please see my current code below. It currently runs the DoWhile loop for ID=1 until ID=250000.
I would like to run the DoWhile loop starting at ID=250001 and ending at ID=500000. This needs to be done without altering the SQL.
Any ideas?
Public Sub fixData()
Dim rs As DAO.Recordset
Dim strSql As String
Dim lngNumber As String
strSql = "Select * from emp_id order by [ID]"
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)
Do While rs![ID] < 250000
If IsNull(rs![dot_one]) Then
rs.Edit
rs![dot_one] = lngNumber
rs.Update
Else
lngNumber = rs![dot_one]
End If
rs.MoveNext
Loop
End Sub