Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Is Null Criteria in a DSum Expression

Is Null Criteria in a DSum Expression

Is Null Criteria in a DSum Expression

I want to be able to sum all of my outstanding invoices within a form I've created for the specific customer record that is active.  My expression is:
=DSum("[Amount]","[Invoices]","[CompanyID]=[txtCompanyID] AND [InvoiceDate]='is null'")

But this just produces an error message.  How do I get it to sum the amounts of invoices where the invoice date is blank because I haven't received payment yet?  Thanks in advance for your help!!!

RE: Is Null Criteria in a DSum Expression

take out the "=" so it's...

=DSum("[Amount]","[Invoices]","[CompanyID]='" & [txtCompanyID] & "' AND [InvoiceDate] Is Null")

assuming [txtCompanyID] is, in fact, a text field & not a literal

if it's a form control then replace [txtCompanyID] with Me.txtCompanyID

RE: Is Null Criteria in a DSum Expression

I beleive that you need to say:
Is Null([Invoice Date])

Mike Rohde

RE: Is Null Criteria in a DSum Expression

i did test before i posted so i know it works in A2K... tho Mike's solution looks elegant

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close