office交流网--QQ交流群号

Access培训群:792054000         Excel免费交流群群:686050929          Outlook交流群:221378704    

Word交流群:218156588             PPT交流群:324131555

Access双击组合框自动依次显示数据

2017-11-28 15:25:00
cg1
转贴
4985

在Access组合框控件中,我们点击组合框,下拉组合框选择数据。

这里我们分享一个选择数据的技巧,双击组合框,按组合库的行来源依次显示数据


如下图,双击组合框,自动按顺序切换字母,组合框名为“Combo0”


详细源码:

Private Sub Combo0_DblClick(Cancel As Integer)
    If Combo0.ListCount < 1 Then Exit Sub
    
    Dim I As Long
    I = Combo0.ListCount
    If Combo0.ListIndex < I - 1 Then
        Combo0.ListIndex = Combo0.ListIndex + 1
    Else
        Combo0.ListIndex = 0
    End If
End Sub

    分享