Link to home
Start Free TrialLog in
Avatar of teustace
teustaceFlag for United Kingdom of Great Britain and Northern Ireland

asked on

CheckBox - How do I show my Three State checkbox to show the NULL state as a string value?

I want to use a checkbox that informs the user that the NULL value is "Unknown". I know the code to show that "Yes" if the checkbox is true & "No" if false but how would I code the NULL value in my table to show "Unknown"? Is this possible? I am using a Visual Basic form and SQL database. The datatype is set to a BIT.
Private Sub LicenceAgreeCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox.CheckedChanged
        If CheckBox.Checked = True Then
            CheckBox.Text = "Yes"
        Else
            CheckBox.Text = "No"
        End If
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of teustace

ASKER

Hi Jcoehoorn, Many thanks! Works a treat and I can use this for other things....