Button to select all check boxes at one time

vanny

Registered User.
Local time
Yesterday, 21:44
Joined
Feb 18, 2006
Messages
76
Hi All,

I need to create a button (SEL) on a form that when selected it TICKS all the check boxes to YES (a field PSelect stored in a Table). This will reduce time for the user, having otherwise to tick all the boxes one by one.

Any suggestions about the code, please?

Thanks a lot.
 
Are you talking about one record, i.e Checkbox1, Checkbox2, Checkbox3 etc or all records with a checkbox?
 
vanny said:
Hi All,

I need to create a button (SEL) on a form that when selected it TICKS all the check boxes to YES (a field PSelect stored in a Table). This will reduce time for the user, having otherwise to tick all the boxes one by one.

Any suggestions about the code, please?

Thanks a lot.

If you want to change ALL the records in the db, then ...

Code:
Dim strsql As String

strsql = "UPDATE Your_Table_Name SET Your _Table_Name.PSelect = True"

DoCmd.RunSQL strsql
 
If you want to select all the checkboxes on a form then:

Private Sub btnSelect_Click()

Me.Checkbox1 = True
Me.Checkbox2 = True
Me.Checkbox3 = True

End Sub
 
Thanks a lot for the help, it worked successfully ;)
 

Users who are viewing this thread

Back
Top Bottom