Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts

    Access DSum syntax error using Date Criteria

    Hi - Hope someone can help!

    I am writing a query using Table 1 with fields Account, StartDate, Enddate. I am trying to sum field Amountx from (table) Transactions for Transactions field Datex is smaller than Table1 field StartDate.

    I can do this using a constant and get a correct result "Paidx: DSum("Amountx","Transactions","[Datex]<=#" & '30/4/2012' & "#")"

    But if I use the field StartDate then I get a null answer : Paid: DSum("Amountx","Transactions","[Datex]<=#" & [StartDate] & "#")

    Can anyone help please? This is driving me mad.

    Regards - SueMe

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Melbourne, Australia
    Thanked 27 Times in 27 Posts
    The DSum above references table Transactions only.
    You could use a totals query to do what you want.

  3. The Following User Says Thank You to patt For This Useful Post:

    sueme (2013-02-21)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts