0

hi guys, is this possible

Private Sub Command1_Click()
    

    Adodc1.Refresh
    Adodc1.Recordset.Update
    Adodc1.Recordset.Fields("Balance") = Val(Text1.Text) - Val(Text2.Text)
     Adodc1.Recordset.Fields("Amount_Paid") = Val(Text2.Text) + Val(Text3.Text)
    Adodc1.Recordset.Update
    

    Adodc1.RecordSource = "SELECT * FROM Tuition_Fee WHERE Tuition_Fee_ID_PK = " & Form2.Label16.Caption
    Adodc1.Refresh
     
    Text4.Text = Adodc1.Recordset.Fields("Total_Tuition")
    Text3.Text = Adodc1.Recordset.Fields("Amount_Paid")
    Text1.Text = Adodc1.Recordset.Fields("Balance")
   
    MsgBox "Tuition Updated"
 
Printer.Print "                                            Official Reciept"
Printer.Print " "
Printer.Print "               ID Number: " & Form2.Text10.Text & "                    " & Label3.Caption
Printer.Print " "
Printer.Print "Name: " & Form2.Text3.Text & " " & Form2.Text4.Text & " " & Form2.Text2.Text
Printer.Print ""
Printer.Print "Payment for Tuition and Fees: P" & Text2.Text
Printer.Print ""
Printer.Print ""
Printer.Print ""
Printer.Print ""
Printer.Print "                                                 " & "Signature of Teller above"
Printer.EndDoc


adoTransaction.Refresh
adoTransaction.Recordset.Fields("Amount_Paid") = Text1.Text
adoTransaction.Recordset.Fields("Tuition_Fee_ID_FK") = Adodc1.Recordset.Fields("Tuition_Fee_ID_PK")
adoTransaction.Recordset.Fields("OR_Number") = "OR-" & "000" & Format(adoTransaction.Recordset.Fields("Transaction_ID_PK"), "####")
    Text2.Text = ""
End Sub

i first use

Adodc1.Recordset

then at making a transaction_log

i used another adodc

adoTransaction.Recordset

can i make this work? i mean, is this possible?

added:

it says, run-time error '-214721900 (80040e14)
Syntax error in FROM clause

Edited by student02: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by vb5prgrmr
0

It looks like it is possible but the error you reported is a problem with your query... It is saying that this part...

strSQL = "SELECT * FROM tablename

is the problem. It might be you have accidently misspelled the table name in some way or anothere. Go back and check to see that you have it spelled correctly... Also, sometimes M$ Access will report the incorrect error code through the drivers, so to double check, use debug.print on your query string and copy it from the debug window to the sql window of the create a query in access. Run it and see if there is a problem and what that problem is...

Good Luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.