1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access: group by field in a report

Discussion in 'Business Applications' started by Zack Barresse, Jul 13, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. Zack Barresse

    Zack Barresse Thread Starter

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Hi all,

    I'm trying to create a report based on a small database of info imported from Excel. What I want to do is have the report totalled by month. I created a new field for the main table with an update query that added just the month name (don't know if I need that to total by month or not, there is a date field as well). I've uploaded the database to give a better example.

    What I want to end up with is a report that shows a Monthly total for each Source in the database. There are five sources, so this should be 60 different totals. There is a field in the database called 'galTKN', this value should appear in that summary as well. The value will not change and is the same for every record. I was debating creating an extra table for this, but it could change in the future.

    Let me know if you need any other information. TIA. :)
     

    Attached Files:

  2. Zack Barresse

    Zack Barresse Thread Starter

    Joined:
    Jul 25, 2004
    Messages:
    5,452
  3. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Wow, lol. Sorry nobody's posted on this yet Zack. I've been off the boards, I'll have a look at it.

    chris.
     
  4. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Hehe, or maybe I won't. Any chance of getting that in a 2000 version? Or is there unconvertable code (though I doubt the code should matter)?

    chris.
     
  5. Zack Barresse

    Zack Barresse Thread Starter

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Actually, with the help of pbaldy I got it...

    Code:
    SELECT Format([galDate],"mmm yyyy") AS TheMonth, tblGallons.galSource, Sum(tblGallons.galTKN) AS SumOfgalTKN, Sum(tblGallons.galGallons) AS SumOfgalGallons
    FROM tblGallons
    GROUP BY Format([galDate],"mmm yyyy"), tblGallons.galSource, Format([galdate],"yyyymm")
    ORDER BY Format([galdate],"yyyymm");
    
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/482896

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice