need help here guys!
i want to open record from form1 and form1 composed of two listview namely listview1 and listview2
if i choose listview1 or listview2, form2 will appear and data will display in labels
then if listview1 was selected then save it on table 1st_sem and listview2 on table 2nd_sem
here's my code, once i click the save button nothing happens. what wrong with my code?
If Label1.Caption = ID_no And Label2.Caption = Null Then
With Adodc1.Recordset
.fields("fname") = labelfname.caption
.fields("lname") = labellname.caption
.Fields("grade") = cbgrade.Text
.update
MsgBox "1st Semester Grade Added", vbInformation, "Success"
End With
Exit Sub
elseif Label2.Caption = ID_no And Label1.Caption = Null Then
With Adodc2.Recordset
.fields("fname") = labelfname.caption
.fields("lname") = labellname.caption
.Fields("grade") = cbgrade.Text
.update
MsgBox "2nd Semester Grade Added", vbInformation, "Success"
End With
Exit Sub
else
msgbox "invalid grade"
End If