Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to DSum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DSum Contract Invoice Amount
James Hopkins 
     
3 years ago
Hey Guys, I created an Contract Information Dashboard Form that displays the "Selected Contract Details". The problem I'm running into is when I DSum the Amount of Contract Invoices by Status.

Here's what I have:

=Nz(DCount("*","InvoiceT","ContractID=" & [ContractID] And "[InvoiceStatusID] = 'Invoice Pending'"),0)
James Hopkins OP  @Reply  
     
3 years ago
Hey Guys, I also tried this: =Nz(DLookUp("InvoiceTotal","InvoiceQ","ContractID=" & [ContractID] And " & [InvoiceStatusID]=313"),0)
Adam Schwanz  @Reply  
           
3 years ago
Rewatch the DLookup video and other Dfunctions, your quotations/concatenations are all over the place.


=NZ(Dcount("*","InvoiceT","ContractID=" & [ContractID] & " and InvoiceStatusID=""InvoicePending"""),0)


Watch this one too Concatenation
James Hopkins OP  @Reply  
     
3 years ago
Thanks Adam for the help, I will try this next.
James Hopkins OP  @Reply  
     
3 years ago
Hey, here's what I came to use:

Number of Invoices: =Nz(DCount("*","InvoiceT","ContractID=" & [ContractID] & " AND InvoiceStatusID=313"),0)

Amount of Invoices: =Nz(DLookUp("InvoiceTotal","InvoiceQ","ContractID=" & [ContractID] And " & [InvoiceStatusID]=""313"""),0)
James Hopkins OP  @Reply  
     
3 years ago
=DSum("Total","Invoices","[Invoice Date]>=Date()-60 &  [Invoice Date]<=Date()-30 & " AND [Invoice Status]='Overdue'")
Scott Axton  @Reply  
        
3 years ago
Go look at the Common Formats on the DLookup page about half way down the page.
Depending on the data type (Number, Date, Text) the way your formula will be different.

Also on the page above.  You are missing your # symbols for the dates.
James Hopkins OP  @Reply  
     
3 years ago
Hey Scott, I change the

Amount of Invoices, 'Overdue by 30 - 60 Days: =Nz(DSum("InvoiceTotal","InvoiceQ","InvoiceDate >=#" & Date()-30 & "# AND InvoiceDate <=#" & Date()-60 & "# AND InvoiceStatusID= 320"),0)

Number of Invoices, 'Overdue by 30 - 60 Days: =Nz(DCount("*","InvoiceT","InvoiceDate >=#" & Date()-30 & "# AND InvoiceDate <=#" & Date()-60 & "# AND InvoiceStatusID= 320"),0)

but I was change the 'Amount of Invoices, "Overdue by 30 - 60 Days" to a DLOOKUP and lookup the InvoiceTotal from the InvoiceQ?
Adam Schwanz  @Reply  
           
3 years ago
No, don't change it to a DLookup, that is for looking up one value. But the dlookup page has a great color coded list of syntax on the page below the main paragraph "Common Formats"
Alex Hedley  @Reply  
           
3 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in DSum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 6:01:20 PM. PLT: 1s