I'm trying to save data from checkbox to database
Private Sub Check2_Click()
If Check2.Value = True Then
Check2.Caption = "OK"
ElseIf Check2.Value = False Then
Check2.Caption = "not ok"
End If
End Sub
Private Sub Form_Load()
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source
=C:\Users\MIS02\Documents\checkstrial.accdb;Persist Security Info = false"
rs.Open "Select * from tableCheck", con, adOpenDynamic, adLockPessimistic
DTPicker1.Value = Date
End Sub
Private Sub addBtn_Click()
rs.AddNew
rs.Fields("CheckItem").Value = Label2.Caption
rs.Fields("Itemno").Value = Label17.Caption
rs.Fields("Criteria").Value = Label38.Caption
rs.Fields("AMafter").Value = Check2.Caption
rs.Update
MsgBox "Data add successfully"
The only fields that being saved in my database are labels I want the output to be saved in database if the checkbox is checked "OK" and if not then "NOT OK"