Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is Null Criteria in a DSum Expression

Status
Not open for further replies.

djgolds

Technical User
Dec 11, 2000
23
US
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!!!
 
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
 
I beleive that you need to say:
Is Null([Invoice Date])
Mike Rohde
rohdem@marshallengines.com
 
i did test before i posted so i know it works in A2K... tho Mike's solution looks elegant
 
I stand corrected
Mike Rohde
rohdem@marshallengines.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top