Dim SyncCriteria As String
Dim rs As DAO.Recordset
'Define the from object and recordset object for the form
Set rs = Me![your subform].Form.RecordsetClone
' define the criteria used for the sync
SyncCriteria = "[yourKeyfield]= " & Somevalue
' find the corresponding record in the Parts table
rs.FindFirst SyncCriteria
Me![Contacts subform].Form.Bookmark = rs.Bookmark
---------------------
This code requires you to know the unique ID of record number 5. Then it sets a bookmark to it and sets focus to it.
Suppose you have Contacts in the subform then you would have to know the ContactID of record number 5
DougP, MCP
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.