I have a form named Services_subform and a subform of that named Serviceshistory_subform. Services_subform is a single form and ServicesHistory_subform is a datasheet form. There is a one-to many relationship between the tables that are the record sources for these subforms- tblServiceIstance for the Services_subform and tblServiceHistory for ServicesHistory_subform. The forms work correctly except for cycling through the records.
I created some arrow buttons on the Services_subform so that I could move between records on the Services_subform. When I push the button, it cycles through all the records on the ServicesHistory_subform first and then moves to the next record of the Services_subform. I don't want that behavior but not sure how to fix it. If I enable the navigation buttons on the subform it works correctly but I intend to disable those buttons.
Here is a sample of the the code for moving to the next record. I also have a similar script for moving to the previous record.
ThanksCode:Private Sub CmdNextServiceInstance_Click()On Error GoTo Err_CmdNextServiceInstance_Click With Me.RecordsetClone If Not .EOF Then .MoveNext Me.Bookmark = .Bookmark Else Exit Sub End If End With Exit_Err_CmdNextServiceInstance_Click: Exit Sub Err_CmdNextServiceInstance_Click: Msgbox Err.Description Resume Exit_Err_CmdNextServiceInstance_Click End Sub