I have a form and subform with a one to many relationship. I am using the code below to go to a specific record but after using this code the subform does not show any entries for the many part of the relationship. Does someone know why this is? Used to work before I made this change.
Code:Dim rs As Object Dim lngBookmark As Long 'set a variable to the current record lngBookmark = Me.PARTS_ID 'open the new form DoCmd.OpenForm "FRM_DETAIL_EDIT" 'take it to the selected record Set rs = Forms!FRM_DETAIL_EDIT.RecordsetClone rs.FindFirst "PARTS_ID = " & lngBookmark 'the lines marked as optional can be included if there's a chance the record won't exist in the form being opened Forms!FRM_DETAIL_EDIT.Bookmark = rs.Bookmark Set rs = Nothing