Results 1 to 3 of 3
  1. #1
    murfeezlaw is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    26

    Simple Group By Query w a placeholder record?

    I'm running a Group By Query to get totals by Tier. If i have 4 records...3 have a value of 3 in the Tier field and 1 has a value of 2 in the Tier field I will get the following result from a Group By query for example



    Tier Discount Rooms Units CUWODO CUWDO 2FAM 18H COMM_OFF WH VAC
    2 20 188 14 14 14 14 14 14 14 14
    3 20 511 30 24 24 54 26 28 12 22






    I want to see this if there are no records under Tier 1.

    Tier Discount Rooms Units CUWODO CUWDO 2FAM 18H COMM_OFF WH VAC
    1 0 0 0 0 0 0 0 0 0 0
    2 20 188 14 14 14 14 14 14 14 14
    3 20 511 30 24 24 54 26 28 12 22








    Can anyone give me an idea how to do this? Is there a way to create a "dummy" record place holder for Tier 1 and give all 0s? Any help would be very much appreciated. I'm trying to find a way to do this but i'm not even sure how to look up help because i don't know how to describe what i'm trying to do.
    TIA
    Ted

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Build a table with one record for each possible Tier. Join this table to your existing aggregate query on the tier fields. Group on the tier values from the new table.

  3. #3
    murfeezlaw is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    26
    Ugghhh why didn't i think of that? Great idea and it worked like a charm. Thank you for your help!

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

Similar Threads

  1. group record by months
    By Compufreak in forum Access
    Replies: 3
    Last Post: 08-03-2012, 05:11 AM
  2. Sum only first record of group
    By RogerC in forum Access
    Replies: 3
    Last Post: 07-18-2012, 10:19 PM
  3. Replies: 5
    Last Post: 09-22-2011, 02:10 PM
  4. GROUP numerous lines to one record
    By tweetyksc in forum Queries
    Replies: 3
    Last Post: 07-21-2010, 01:14 PM
  5. Simple record lookup?
    By Transeau in forum Access
    Replies: 0
    Last Post: 01-18-2006, 10:27 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