set control value before loading the form

I am loading a form in access database called "add"..before loading this form I want to set all the checkboxes on this form to value 0. I mean empty white small checkboxes..The code to load is given below..please add the code to set the check boxes.

'stDocName = "Search"
'DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm "Add", , , stLinkCriteria

Thank you.
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The checkbox is part of an Option Group, and in this scenario only the Option Group (i.e. Frame) has a Default value.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You'd want to do this in the Load or Open even of your from named "Add":

Sub Form_Load()
  Me.YourCheckboxName = False
  Me.YourNextCheckbox = False
End Sub
Alternate method is that you can predefine the state of checkbox. that is by default value is zero which you can set by properties of checkbox.

Chetan Sachdeva
AiyshaAuthor Commented:

I want to change the default value to zero, but for I dont know what reason, the properties of the checkbox does not have the default value option.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.