Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Location
    UK
    Posts
    233

    Unanswered: sum a group of records within a field on a form

    How do I add a sum to a selection of items within the same field on a form.

    Let me explain:-

    I have a product field and a quantity field

    This is how they currently appear o my form

    Product Qty
    A 10
    B 20
    C 10
    A 30
    A 50
    B 10

    I have a number of products and I need to show the total of each product.

    This is how I want them to appear.

    Product Qty
    A 90
    B 30
    C 10

  2. #2
    Join Date
    Apr 2003
    Posts
    280
    Table Name: ProductsInfo(Product, Qty)

    Select ProductsInfo.Product, Sum(ProductsInfo.Qty) as TotalofProduct
    From ProductsInfo
    Group By ProductsInfo.Product;
    Last edited by lansing; 09-24-03 at 11:41.

Posting Permissions

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