Results 1 to 2 of 2

Thread: How does one, add a entire column from a database?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    25

    Post

    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

  2. #2
    New Member
    Join Date
    Feb 2000
    Posts
    12

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width