I have a subform (continuous form) with a button on each row that filters the main form on that record when clicked. When I click the button, the focus on the subform jumps to the top (i.e. first record) of the subform. How can I make the focus stay on the record.
In other words, I click the button next to record 100, and the focus changes to record one on the subform (main form displays record 100 as intended). I want focus on subform to stay on record 100.
Here's the VBA code I'm using:
Private Sub select_record_button_Click()
Me.Parent.Form.Filter = "[ID]=" & Me.ID
Me.Parent.Form.FilterOn = True
End Sub
The above code is on the On Click event for the button on the subform.