开发者

When select value from combo, highlight that record in Access subform datasheet

开发者 https://www.devze.com 2023-03-22 13:31 出处:网络
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 selecte开发者_

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 selecte开发者_如何转开发d 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?


Something like this:

Private Sub Combo0_AfterUpdate():
    With Me.Child0.Form.Recordset
        .FindFirst "ID_Field=" & Me.Combo0
    End With
End Sub
0

精彩评论

暂无评论...
验证码 换一张
取 消