C
Cabby
The following code gives me Error 91 after I click button a second time.
Can someone tell me how to fix it.
Private Sub cmdTest_Click()
Dim rs As Recordset
Dim bmkReturnHere As Variant
Set rs = Me.Recordset
rs.MoveFirst
Do Until rs.EOF
bmkReturnHere = rs.Bookmark
If rs!OKd = False And rs!RunsOffOf <> 0 Then
rs.FindFirst "ID = " & rs!RunsOffOf
Do While Not rs.NoMatch
rs.Edit
rs!OKd = False
rs.Update
rs.FindNext "ID = " & rs!RunsOffOf
Loop
End If
rs.Bookmark = bmkReturnHere
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
tia,
Cabby
Can someone tell me how to fix it.
Private Sub cmdTest_Click()
Dim rs As Recordset
Dim bmkReturnHere As Variant
Set rs = Me.Recordset
rs.MoveFirst
Do Until rs.EOF
bmkReturnHere = rs.Bookmark
If rs!OKd = False And rs!RunsOffOf <> 0 Then
rs.FindFirst "ID = " & rs!RunsOffOf
Do While Not rs.NoMatch
rs.Edit
rs!OKd = False
rs.Update
rs.FindNext "ID = " & rs!RunsOffOf
Loop
End If
rs.Bookmark = bmkReturnHere
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
tia,
Cabby