Hello Ladies/Gents, im in need of some serious help here.. I have a tool that allows users to view information on a form and make changes to recordsets. This tool has buttons that allow a user to cruise to the next or previous record. The problem i am having is when they click next record it moves to the next record and checks to see if the record is stamped as open. If it is stamped as open, meaning opened by another user, then it will continue to proceed to the next record until it reaches a record not already stamped open. I will post the code below Im using for next the previous is the same except for it moves previous. When they click next or previous even though they are not changing any information, just checking to see if the record is open, the user who was looking at that record gets an error when trying to click next record. Its an error relating to the row was modified outside of cursor. My question is how am I supposed to allow them to proceed through records without getting this error? They are not modifying the record just looking to see if its stamped open.
thanks for your help.
thanks for your help.
Code:
redoLoop:
If Not rs.EOF Then
rs.Fields("current User ID") = ""
rs.Update
rs.MoveNext
curRecord = curRecord + 1
If rs.EOF Then
rs.MovePrevious
curRecord = curRecord - 1
If utreview = "Y" Then
MsgBox ("You have reached the end of the review.")
Unload Me
utreview = ""
Exit Sub
End If
End If
If typeReview = "IA" Then
If rs.Fields("current user id") <> "" Or rs.Fields("IA Review Date") <> "1/1/1900" Then GoTo redoLoop
ElseIf utreview = "Y" Then
Else
If rs.Fields("current user id") <> "" Or rs.Fields("UT Date") <> "1/1/1900" Then GoTo redoLoop
End If
End If
popRecord
Exit Sub
Comment