G
Guest
To move to specific record number on my form I use the following borrowed
code (snippet):
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "ID_address = " & fldSearch
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
Else
MsgBox ("ID-number not found")
Exit Sub
End If
Set rs = Nothing
I have a few questions about it:
1. Is there a shorter way of coding to move to a specific record in a form?
2. What does 'set rs = Nothing' actually do? What can happen if you omit it?
Thanks,
John
code (snippet):
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "ID_address = " & fldSearch
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
Else
MsgBox ("ID-number not found")
Exit Sub
End If
Set rs = Nothing
I have a few questions about it:
1. Is there a shorter way of coding to move to a specific record in a form?
2. What does 'set rs = Nothing' actually do? What can happen if you omit it?
Thanks,
John