View Full Version : more checkboxes


hollywhore
03-20-2001, 04:15 AM
i have created several checkboxes which can all be checked. however i would like to add another checkbox entitled 'all'. this check box when checked will check all the other boxes automatically. help! i havent a clue

Keith P
03-20-2001, 04:55 AM
In the AfterUpdate event of the 'all' checkbox

Dim ctl as control
If me![all checkbox name here] = true then
For each ctl in me.controls
If ctl.controltype = acCheckBox then
ctl.value = true
end if
next
end if

Everton
03-20-2001, 04:55 AM
Don't know if it's the best solution but try putting code in the on click event of the 'all' checkbox like this:

If Me![all]=true then
Me![box1]=true
Me![box2]=true
etc..
End If

Hope this helps,
Paul