Results 1 to 2 of 2
  1. #1
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38

    Filter Sums By year

    Hello Friends I need your help:

    I have a Database [Base]: with fields: Products, Brand, Snumber, Pnumber, Price, SumAll, DateofPurchase...
    The database is filled from 2009 year, now I have many records and I need to calculate the sum by years: Here is the Expression which i use, but i have to set the start year :
    =DSum("SumAll","Base","Dateofpurchase >= #01/01/2009#") it is calculating from "01/01/2009" to the current date.

    I created one Combo box and set the values to filter by years.....:
    1/1/2011 Only this year


    1/1/2010 Only this year
    1/1/2009 Only this year
    SUMALL All Years

    Thank You in advanced

  2. #2
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Instead of > symbol, try using the between function.

    Look here for syntax:

    http://www.techonthenet.com/sql/between.php

    Alan

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

Similar Threads

  1. Two Sums, Three Table, and joins problem
    By jbarbara11 in forum Queries
    Replies: 1
    Last Post: 12-08-2010, 03:46 PM
  2. How do I sum multiple sums?
    By RobRay in forum Reports
    Replies: 6
    Last Post: 11-26-2010, 08:48 PM
  3. Rolling 3 Month sums
    By michaeljohnh in forum Reports
    Replies: 1
    Last Post: 11-08-2010, 05:51 AM
  4. Sums of Multiple Queries
    By flsticks in forum Queries
    Replies: 5
    Last Post: 09-16-2010, 09:32 AM
  5. calculating sums in reports
    By Hannu in forum Reports
    Replies: 1
    Last Post: 03-12-2009, 02:59 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