0

Im just having a problem on my VB 5 update command..

Adodc1.RecordSource = "UPDATE Tuition_Fee SET (Amount_Paid, Balance) VALUES(" & WHERE Tuition_Fee_ID_PK = " & Form2.Label16.Caption
    'Adodc1.RecordSource = "UPDATE Tuition_Fee SET (Amount_Paid = " &  & ", Balance = " & Val(Text1.Text) - Val(Text2.Text) & ") WHERE Tuition_Fee_ID_PK = " & Form2.Label16.Caption

anyone? thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by student02
0
'where Tution_Fee = tablename
strSQL = "UPDATE Tution_Fee SET (Amount_Paid = [Tution_Fee].[Amount_Paid]+" & (Val(Text1.Text) - Val(Text2.Text)) & " WHERE Tuition_Fee_ID_PK = " & Form2.Label16.Caption

Good Luck

0

thanks vb5prgrmr

i solved it using this one :)

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("Tuition_Fee")
    Text3.Text = Adodc1.Recordset.Fields("Amount_Paid")
    Text1.Text = Adodc1.Recordset.Fields("Balance")
This question has already been answered. 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.