1.11M Members

opening record from form1 then save either of the two tables.

 
0
 

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
 
0
 

Have a look at this current Daniweb discussion here. It will give you all the options needed as per your question...

 
0
 

i opened you posted discussion, but i cant understand.
but just forget this post. ive already figured out my problem
thanks for the help

Question Answered as of 1 Year Ago by AndreRet
 
0
 

No problem.
Happy coding.

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article