chek Yes/No

bhelmy

Registered User.
Local time
Today, 22:53
Joined
Dec 6, 2015
Messages
62
I have a "continuous" subform which is linked to a table which has a checkbox field. I would like to create a Check All/Uncheck All in form
 

Attachments

Last edited:
Code:
Private Sub Check11_AfterUpdate()
    CurrentDb.Execute "UPDATE Table1 SET ff = " & Nz(Me.Check11, False)
    Me.Requery
End Sub
 

Attachments

Last edited:
when to do that in my DB have error
Run time error 3144
syntax error in Update Statement
 
First: please note I edited the above post.

These two lines of code go in the checkbox AfterUpdate event handler
 
personally i prefer to have it set up to either select all or deselect all just in case they select all in error. I usually use a command button with a caption that changes. heres your db with both a button and a checkbox code.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom