InFlight
User
- Local time
- Tomorrow, 04:40
- Joined
- Jun 11, 2015
- Messages
- 130
I have this code to move to next record in a recordset on main form. it works once then doesn't work
Code:
Dim rs As Object
Dim strLinkValue As Integer
strLinkValue = Me![ClassID].Value 'Name of Link Field On Subform
Set rs = Forms!frmWinners.Recordset.Clone 'Name of the Main Form
rs.MoveLast
rs.MoveFirst
rs.FindFirst "[ClassID] = " & strLinkValue 'Name of Link Field on main form
If rs.NoMatch Then
MsgBox "Record not found"
Else
rs.MoveNext
Forms!frmWinners.Bookmark = rs.Bookmark 'Main Form
End If
rs.Close
Set rs = Nothing