Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2011
    Posts
    5

    Unanswered: MS Access sum values of one field in all records of one table

    I am noobie to MS Access but well-versed in Foxpro 2.5a for DOS and wish to migrate from to Foxpro 2.5a for DOS to MS Access - hence need help with some basic questions - how to do in MS Access whatever I used to do easily in command line of Foxpro 2.5a for DOS.

    My first question - How to sum values of one field in all records of one table in MS Access - equal to "Sum Receipt to x"; "Sum Expense to y; "?x,y" in Foxpro 2.5a for DOS.

    Thanx in advance!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    When working with VBA, you can use the domain function DSum():
    Code:
    Total = DSum("FieldName", "TableName", StringCriteria)
    In SQL, you can use:
    Code:
    SELECT Sum(ColumnName) 
    FROM   TableName
    WHERE  ...
    GROUP BY ...
    Have a nice day!

  3. #3
    Join Date
    Oct 2011
    Posts
    5

    How to sum values of one field in all records of one table in MS Access

    Many Thanx Sinndho!

    After I dive deeper into MS Access, I shall try your suggestion and get back to you.
    --
    Last edited by logamuthu; 11-22-11 at 14:58. Reason: Spell error of name Sinndho

  4. #4
    Join Date
    Oct 2011
    Posts
    5

    How to sum values of one field in all records of one table in MS Access

    Many Thanx Sinndho!

    After I dive deeper into MS Access, I shall try your suggestion and get back to you.
    --

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Tags for this Thread

Posting Permissions

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