Row numbers change in Access. The data is stored as it is originally
entered, but compaction and indices can change that and every time it is
filtered, it also changes. If you have a Primary Key (and you should have
one on every table) you can use that to locate your record. There are a
number of ways. An example might be to filter a form to a specific record:
Private Sub cboSearch_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = Me.Recordset.Clone
rst.FindFirst "PersonID = " & Me.cboSearch
If Not rst.EOF Then Me.Bookmark = rst.Bookmark
End Sub
The above code uses the bound column of cboSearch which contains the
PersonID, to locate the record in the form's recordset.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access