Results 1 to 7 of 7
  1. #1
    bjsbrown is offline Novice
    Windows 7 Access 2000
    Join Date
    Oct 2009
    Posts
    21

    Help with dsum


    Using the following in a group footing in text box in a report. I want the amount field [ConAmt] totaled if the Date field [ConDte] falls between the specified dates. Contributions is the name of the table. I get #error on report. What do I need to do. Please keep simple; still learning. Thanks.

    =DSum("[ConAmt]","Contributions","[MemID]=2 and [ConDte] Between #01/01/2010# And #01/31/2010#")

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Try the following:
    Code:
    =DSum("[ConAmt]","Contributions","[MemID]=" and [ConDteBetween  #01/01/2010# And #01/31/2010#") 

  3. #3
    bjsbrown is offline Novice
    Windows 7 Access 2000
    Join Date
    Oct 2009
    Posts
    21
    Thanks but still #error

  4. #4
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Verify that your table and field names are correct.

    Building your DSum in parts, that is, with no parameter, then 1, then 2.

  5. #5
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Is 2 an Integer or text.

  6. #6
    bjsbrown is offline Novice
    Windows 7 Access 2000
    Join Date
    Oct 2009
    Posts
    21
    It's an integer and I've used '2' but still #error. Can you show another way of achieving the same result?

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try adding parens:
    =DSum("[ConAmt]","Contributions","([MemID]=2) AND ([ConDte] Between #01/01/2010# And #01/31/2010#)")

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

Similar Threads

  1. DSUM HELP needed
    By jjmartinson in forum Access
    Replies: 0
    Last Post: 07-21-2009, 01:47 PM
  2. DSUM HELP! I am frustrated
    By PnerraD in forum Reports
    Replies: 2
    Last Post: 09-24-2007, 02:23 PM
  3. DSUM Problems
    By swampdonkey in forum Forms
    Replies: 2
    Last Post: 09-29-2006, 10:52 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