Results 1 to 3 of 3
  1. #1
    HectorH is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    14

    Total table from existing table from

    I want to make a table that has just the totals from another table.

    Example source table:
    equip color size
    x red S
    y green M
    z red L
    f red L

    Output table
    [Equipment total] [red] [green] S M L


    4 3 1 1 1 2

    Is there a simple way to do this? They only way I know how is to make separate queries and combine them into one later

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Yes there is, but it's clumsy and likely will not fit your need for large datasets.


    For each field you wanted a total for on this combined query you'd have to have something like

    TotalRed: iif(color = 'red', 1, 0)
    TotalGreen: iif(color = 'green', 1, 0)

    then add a summation line (click the sigma button in your query design) and sum the totalred, totalgreen and so on fields.

  3. #3
    HectorH is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    14
    Perfect. Exatly what I needed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  2. Replies: 7
    Last Post: 04-15-2011, 08:46 AM
  3. Replies: 1
    Last Post: 03-21-2011, 06:01 AM
  4. Updating an Existing Table
    By jo15765 in forum Access
    Replies: 2
    Last Post: 11-21-2010, 09:11 PM
  5. Using VBA create a new table from an existing table
    By KramerJ in forum Programming
    Replies: 0
    Last Post: 03-25-2009, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums