I would like to be able to look at the captions of 5 check boxes and based on if there’re checked copy the name (caption) to a sub form text box. I’m not sure if I can do it and what the syntax should be. The code that I’m playing with is this:
Code:
Dim ctl As Control, flg As Boolean
Dim Msg As String, Style As Integer, Title As String
For Each ctl In Me.Controls
If ctl.ControlType = acCheckBox Then
If ctl Then
If flg = True Then
[COLOR=red]ctl.caption = Forms.frmMain.frmsubMain.Form.TestBox [/color]
Exit For
End If
End If
End If
Next