I have a db that has 20 customer totals. I need my program to add all 20 customer totals together and display the customer total's sum. How does one, add an entire column from a database?
Darkcloud
Printable View
I have a db that has 20 customer totals. I need my program to add all 20 customer totals together and display the customer total's sum. How does one, add an entire column from a database?
Darkcloud
Hey Darkcloud,
You may want to try using an SQL statement to get that column data...
use this SQL statement for one of your recordsets:
SQL_STATEMENT = "SELECT SUM(COLUMN_NAME) FROM TABLE_NAME"
then display the return recordset in your desired label (something like this :)
lblSum.caption = rs("SUM")
I am not sure of the type of Database you are using, or your method of accessing it, so if this looks cryptic, let me know!
Hope that helps!!
~Sam