Reputation: 3549
I have an Access form with a combobox and a subform on it. The subform is in datasheet mode (the way I want it). What I'm trying to do is make a sort of search function. When something is selected from the combobox, I want the subform's datasheet to scroll to and highlight the matching record.
I do not want to filter the subform (i.e. remove all non-matching records).
Can anyone give me some guidance on how to achieve this?
Upvotes: 4
Views: 2113
Reputation: 24227
Something like this:
Private Sub Combo0_AfterUpdate():
With Me.Child0.Form.Recordset
.FindFirst "ID_Field=" & Me.Combo0
End With
End Sub
Upvotes: 3