access中窗体设计 如何用代码计算复选框选中数

2024-12-26 10:57:09
推荐回答(2个)
回答1:

我有相关材料,需要可以私信我

回答2:

遍历窗体控件,判断计算
Dim ctr As Control
Dim i As Integer
i = 0
For Each ctr In Me.Controls
If TypeName(ctr) = "checkbox" Then
If ctr.Value = True Then i = i + 1
End If
Next
MsgBox i