Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    summing


    I have posted prior to a calculated field and it works fine but would like to sum the column for the 2011 date. Here is what I have in the text field that sums the whole column. =sum([name])

  2. #2
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    I have tried this but get a minus one. ([Travel Mileage])>("2010"). Is there someone that has a link in this site that shows sum by date?

  3. #3
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I have tried this but get a minus one. ([Travel Mileage])>("2010"). Is there someone that has a link in this site that shows sum by date?
    Minus one in Access means TRUE. You are doing a comparison of a value in a field named "Travel Mileage" with a text string.


    Probably the reason that no one has responded is that your first post is vague and contains almost no usable information on your problem. What are you trying to do? What have you tried? What are the table names; field names; field types; relationships; any queries that are close; form or report?
    Do you have Screenshots? sample MDB?

    Post back with more info.... try to be specific......


    Here are three sites I use to find solutions:

    "The Access Web" http://mvps.org/access/

    "Rogers Access Library" http://www.rogersaccesslibrary.com/

    "Allen Browne's site" http://allenbrowne.com/tips.html


    BTW, "name" is a reserved word in Access (and shouldn't be used for object names), along with words like "Month", "Time", "Year", 'Day"....... to see a long list of reserved words, goto

    http://allenbrowne.com/AppIssueBadWord.html

  4. #4
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    I have a table with a column named [Travel Mileage] I have a calculated text field on a form that I see the total sum =Sum([Travel Mileage]) The problem is that this shows total for the whole column. I want to be able to see the sum of travel mileage but only for 2011 and not see 2010.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Option 1 : Limit the recordset to the records for 2011

    Option 2 : Use the DSUM() function

  6. #6
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    summing

    Thanks for your help. I havent found any examples of this but will keep looking. Eventually I will solve this. Thanks . . . . Rick

  7. #7
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    Dsum("[TravelMileage]","TravelMileageTable","Year(TravelDate)=2011" )

    Replace with your fields and table names.

  8. #8
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    I have tried this but get a #name as an error in the text filed. This is what I used DSUM("[Travel Mileage]"."assets1"."year(travel mileage)=2011") Where [travel mileage] is the column summed in the table called assets1. This is in a text field on a form.

  9. #9
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    The Year(travel mileage) condition won't work....you need the field that stores the travel date.

  10. #10
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    Do you mean the text field on the form that displays the mileage?

  11. #11
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    No, I'm guessing you record the travel date in a field in your travel table? That's the field you would use....the field in the table.

  12. #12
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    The travel date is recorded in a column called end date in the table called assets1. so there is a end date for each record.

  13. #13
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    If the end date is in a separate table, then you will need to join the tables in a query. Then you can use your dlookup function based on the query....and you can put your year criteria in the query instead of the dlookup.

  14. #14
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    Suming cont

    Ok. Here is what I have but still doesnt work. Get #name in the form field. DSUM("[Travel Mileage]"."Billing"."year(End Date)=2011. [Travel Mileage] is the column that stores mileage that is entered with each new record. "Billing" is the table name and (End Date) is the column on the same table that a date is entered for each new record. There is something obvious wrong so I will ponder this over for a while. Is there any spaces or like that? Thanks very much for your help.

  15. #15
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    Try this:
    DSUM("[Travel Mileage]","Billing","year([End Date])=2011")

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Summing reports
    By tarhim47 in forum Reports
    Replies: 0
    Last Post: 03-30-2011, 11:07 AM
  2. help with summing columns in a query
    By chrismja in forum Queries
    Replies: 0
    Last Post: 03-08-2011, 07:09 AM
  3. Summing a column
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 05-10-2010, 05:42 PM
  4. need help with summing a range
    By sundance0000 in forum Access
    Replies: 3
    Last Post: 01-12-2010, 02:12 PM
  5. Summing info in one Sub form to another
    By Mxcsquared in forum Forms
    Replies: 0
    Last Post: 12-14-2005, 11:44 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