Uncheck all the checkbox on Continuous Forms

I

Info

I'm not so expert in coding, but I try to find this question in newgroup but
i cant find it. I use the code below but it didn't work, it only uncheck the
first checkbox only, i want to make it uncheck all the checkbox while the
form load, thanks for the help.

Code:
Private Sub Form_Load()
Set statusyes = False
End Sub
 
M

Mike

Try this on a backed up copy of your database
You will need to change NameOfForm to the name of your form
DoCmd.SetWarnings False
If Me.Dirty Then Me.Dirty = False 'Save first.
strSql = "UPDATE NameOfForm SET statusyes = 0 " & _
"WHERE Completed = -1;"

DoCmd.RunSQL strSql
Me.Requery
DoCmd.SetWarnings True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top