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?

Recommended Answers

All 2 Replies

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

Good Luck

Hi,
Attached below is my simple help.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.