1,105,578 Community Members

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

Member Avatar
vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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
Member Avatar
AndreRet
Industrious Poster
4,492 posts since Jan 2008
Reputation Points: 362 [?]
Q&As Helped to Solve: 499 [?]
Skill Endorsements: 24 [?]
 
0
 

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

Member Avatar
vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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
Member Avatar
AndreRet
Industrious Poster
4,492 posts since Jan 2008
Reputation Points: 362 [?]
Q&As Helped to Solve: 499 [?]
Skill Endorsements: 24 [?]
 
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