Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox Default value in a form

Status
Not open for further replies.

KiaKia

Programmer
Mar 30, 2008
59
US
Hi,
I can not set the default value of a checkbox to False on my form. it should be very simple, but I can not figure it out.
What I have done is that I added the following codes in the Addingnew procedure of my form's bindingsource.


Private Sub Tbl1BindingSource_AddingNew(ByVal sender As Object, ByVal e As System.ComponentModel.AddingNewEventArgs) Handles Tbl1BindingSource.AddingNew
Me.CheckBox1.Checked = False
Me.CheckBox1.CheckState = CheckState.Unchecked
End Sub

 
By default a check box is false. Either:

1) The property is modified in properties durning design or by code durning run.

2) The check box is bound so it will default to the current records state of the field it is bound to.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top