Results 1 to 2 of 2
  1. #1
    bosnian is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    1

    Sum of Values over date range

    First of all hello to evryone. I am new on forum and with access as well so sorry if make same funny questions. I have one problem an its related to Sum and group by functions. I have table with four columns and one of them is date. What i need to do is to make querie with sum on one of the column. The problem is when i put sama date range i am not able to get sum just seprated values. I think that you already have picture of what is the problem so i would be very greatfull if you guy and girls help me. Here is also sql view of querie

    SELECT Osnovna.Registration, Osnovna.Date, Osnovna.RegionalCenter, Sum(Osnovna.Fuel) AS SumOfFuel
    FROM Osnovna


    GROUP BY Osnovna.Registration, Osnovna.Date, Osnovna.RegionalCenter, Forms!forma!Date, Forms!forma!Date1
    HAVING (((Osnovna.Date)>=[Forms]![forma]![Date] And (Osnovna.Date)<=[Forms]![forma]![Date1])) OR (((Osnovna.Date)<=[Forms]![forma]![Date1]) AND (([Forms]![forma]![Date]) Is Null)) OR ((([Forms]![forma]![Date1]) Is Null));

    Thank you very much

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Try removing Osnovna.Date from the SELECT and GROUP BY

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

Similar Threads

  1. Replies: 3
    Last Post: 09-29-2009, 07:08 AM
  2. Count Dates within Date Range
    By eckert1961 in forum Queries
    Replies: 2
    Last Post: 03-08-2009, 10:58 AM
  3. how to convert week number to date range
    By qwang1115 in forum Access
    Replies: 1
    Last Post: 02-13-2009, 11:35 AM
  4. Search form with a date range
    By mantro174 in forum Forms
    Replies: 1
    Last Post: 02-11-2009, 10:45 PM
  5. Retrieving Week of Year in a date range
    By Korvega in forum Queries
    Replies: 2
    Last Post: 05-27-2006, 06:29 AM

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