0

Guys. can you help me with my project again? hehe.. sorry for flooding forum with my threads..

I have a table that have a field name Amount_Paid, Date, and Transaction_Number..

i want to add all the data that has been saved on Amount_Paid that has same that, for example, today

Transaction_Number | Amount_Paid | Date
01 5000 06/03/2001
02 3000 07/03/2001
03 2500 07/03/2001

how should i do this?

If Ado_Transaction.Recordset.RecordCount  <> 0 Then
Text2.Text = Ado_Transaction.Recordset.RecordCount 
'The Text2.Text is Invisible.. I just put it for computing
 For x as Integer = 1 to Val(Text2.Text)
Text3.Text += Ado_Transaction.Recordset.Field("Amount_Paid")
End If

will this work? or i mean is this correct?

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by kinwang2009
0

strSQL = "SELECT SUM(Amount_Paid) AS THESUM FROM tablename"
'open
Result = Rs.Fields("THESUM").Value

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.