Hi,
I create a form with 18 checkBox for the user to check the selected options.
It will saved in a table in access. My coding is:
Private Sub cmdSave_Click()
Dim Index As Integer
Dim status As Integer
Dim chk As CheckBox
Index = 0
For Each chk In Check
If Check(Index).Value = vbChecked Then
status = 1
End If
Index = Index + 1
Next
If status = 1 Then
If mode = "Add" Then
rs_a.AddNew
fill
rs_a.Update
MsgBox "One record is added"
ElseIf mode = "Edit" Then
fill
rs_a.Update
MsgBox "One record is updated"
End If
End If
End Sub
Private Sub fill()
rs_a!ID = id.text
rs_a!Newspaper.Value = Check(0)
rs_a!Artile.Value = Check(1)
rs_a!Banner.Value = Check(2)
rs_a!CADDStudent.Value = Check(3)
..
..
End Sub
How can I retrieved the checked value from the table and display it back to the form by the ID??
Please help !!
