As far as I know when a check box is check the value should be 1 and when it is not checked it should be 0 correct?
In my case if I don't check the box its null and if I do its -1
Here is my code
Private Sub AddGeneral()
Dim rsAdd As Recordset
Dim sql As String
If (chk1.checkstate = 1 And chk2.checkstate = 1) Then
Kidney = "Both"
MsgBox "Checked"
ElseIf (chk1.Value = 1 And chk2.Value = "") Then
Kidney = "Self"
ElseIf (chk1.Value = "" And chk2.Value = 1) Then
Kidney = "Family"
Else
Kidney = ""
End If
If (chk3.Value = 1 And chk4.Value = 1) Then
Head = "Both"
ElseIf (chk3.Value = 1 And chk4.Value = 0) Then
Head = "Self"
ElseIf (chk3.Value = 0 And chk4.Value = 1) Then
Head = "Family"
Else
Head = ""
End If
now i put -1 for the values and it worked but if i didnt check them some were 0 and some were null
if i have both check boxes checked it works
returns -1 for both
but if i just check one of the boxes it returns -1 and Null
ive tried -1 and Null, -1 and "", -1 and 0