Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dsum Again (A2000 SR1)

    My Dsum expression doesn't work, can any one check the GIF attached.

    Also can the DSum handle Null entries.
    Attached Images Attached Images

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dsum Again (A2000 SR1)

    I solved it with the following, but needs to handle nulls.
    Do I need to use a IIF and how ?

    =DSum("new","qryBookedInHrs","[BookInDate] = Forms![frmDiary]![BookinDate]")

    Dave

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Dsum Again (A2000 SR1)

    to handle null values...

    =nz(DSum("new","qryBookedInHrs","[BookInDate] = Forms![frmDiary]![BookinDate]"),0)

    If your DSum statement returns a null value, i.e, any BookInDate value is null in the table, this will return a zero.

    To avoid the null values, set the default of BookedInHrs in the table to zero.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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