Hi All
I have a main form with a subform within it and I want to add next and previous buttons on the footer of the main form to cycle thought the records in the sub form. Does anyone know the code or how?
I tried this but no success
Private Sub cmd_Previous_Record_Click()
On Error GoTo Err_cmd_Previous_Record_Click
DoCmd.GoToRecord acDataForm, Forms![SubForm], acPrevious
Exit_cmd_Previous_Record_Click:
Exit Sub
Err_cmd_Previous_Record_Click:
MsgBox Err.Description
Resume Exit_cmd_Previous_Record_Click
End Sub
Thanks
Matt
I have a main form with a subform within it and I want to add next and previous buttons on the footer of the main form to cycle thought the records in the sub form. Does anyone know the code or how?
I tried this but no success
Private Sub cmd_Previous_Record_Click()
On Error GoTo Err_cmd_Previous_Record_Click
DoCmd.GoToRecord acDataForm, Forms![SubForm], acPrevious
Exit_cmd_Previous_Record_Click:
Exit Sub
Err_cmd_Previous_Record_Click:
MsgBox Err.Description
Resume Exit_cmd_Previous_Record_Click
End Sub
Thanks
Matt