set value of control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to reset a list of checkboxes back to "0" after a button is
clicked by iterating through the controls. My code now looks like this:

Dim ct AS control
For Each ct In Me.Controls
If ct.Value <> 0 Then
ct.Value = 0
End If
Next ct

I get an error that method is not supported and I don't see "value" on the
list after typing "ct."
The controls are unbound (I bet that's it but how to do?).
 
hi,
I am trying to reset a list of checkboxes back to "0" after a button is
clicked by iterating through the controls. My code now looks like this:
Checkboxes are True, False or Null, not really "0".
Dim ct AS control
For Each ct In Me.Controls
If TypeOf ct Is CheckBox Then
If ct.Value Then
ct.Value = False
End If
'or ct.Value = Null for all.
End If


mfG
--> stefan <--
 
Back
Top