Delete all checkbox (1 Viewer)

roccoau

Registered User.
Local time
Tomorrow, 02:12
Joined
Sep 1, 2006
Messages
56
Hi
I have a continuous form and one of the feilds is a checkbox.
What I would like to do is have a command button which when I click it all the checkbox's which have a check in them to be deleted.
Can anyone please help me with how I could do this.

Tks Roc
 

missinglinq

AWF VIP
Local time
Today, 12:42
Joined
Jun 20, 2003
Messages
6,420
A simpler solution would be:

Code:
Dim ctrl As Control

For Each ctrl In Me.Controls
    If TypeOf ctrl Is CheckBox Then
       ctrl.Value = False
    End If
Next

Depending on your needs you could put it behind a button or in some other event.
 

roccoau

Registered User.
Local time
Tomorrow, 02:12
Joined
Sep 1, 2006
Messages
56
A simpler solution would be:

Code:
Dim ctrl As Control

For Each ctrl In Me.Controls
    If TypeOf ctrl Is CheckBox Then
       ctrl.Value = False
    End If
Next

Depending on your needs you could put it behind a button or in some other event.

Thanks I will give it a go
 

Users who are viewing this thread

Top Bottom