davesmith202
Employee of Access World
- Local time
- Today, 23:10
- Joined
- Jul 20, 2001
- Messages
- 522
I have a code loop where I run through some data in one recordset and push the data into another recordset. Part of the code is below.
I'm getting a No Current Record error when it hits the rs3.Edit code. Is that because I have done AddNew, Update but the current record still doesn't exist?
I'm getting a No Current Record error when it hits the rs3.Edit code. Is that because I have done AddNew, Update but the current record still doesn't exist?
Code:
If InStr(rs2!Data, "[") > 0 Then
rs3.AddNew
rs3.Update
'
'
Do While (Len(rs2!Data > 0)) And (InStr(rs2!Data, "[") > 0) And (Not rs2.EOF)
If InStr(rs2!Data, "[Date ") > 0 Then
rs3.Edit
rs3!Data = rs2!Data
rs3.Update
ElseIf InStr(rs2!Data, "[Event ") > 0 Then
rs3.Edit
rs3!Data = rs2!Data
rs3.Update
End If
rs2.MoveNext
Loop
End If