Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    query to collaps records and total fields (2k2)

    I have a query that returns the following fields:

    Key
    cus_name
    eng_name
    loc_location
    prj_project
    prd_product
    q1
    q2
    q3
    q4

    where q1, q2, q3, and q4 are dollar amounts for 4 quarters.

    I want to build a query where when the other 5 fields (excluding the key) are all equal (each to themselves), total each of the "q" fields, and collapse them into one record. any ideas?

    thanks, keith

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: query to collaps records and total fields (2k2)

    Create a query based on the one you have.
    Add all fields except the key field to the query grid.
    Select View | Totals, or click the Totals button on the toolbar.
    This will add a Total: row to the query grid.
    Leave the Total option for cus_name through prd_product as the default Group By.
    Set the Total option for q1 through q4 to Sum.

Posting Permissions

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