We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,440 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

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
2
Contributors
3
Replies
6 Hours
Discussion Span
4 Months Ago
Last Updated
4
Views
Question
Answered
vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

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

vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 4 Months Ago by AndreRet

No problem.
Happy coding.

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0630 seconds using 2.66MB