Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access SQL Server Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Missing Argument
Despina Karayanni 
      
5 years ago
Hello,
I've tried to modify SQL code for the query PayeeswithBalanceQ, in order to form a pass through query.
the code is:
SELECT CCur(Nz(DSum("Balance","BillsWithPaymentsQ","PayeeID=" & [PayeeID]),0)) AS TotalBalance, CCur(Nz(DSum("Balance","BillsWithPaymentsQ","PayeeID=" & [PayeeID] & " AND DueDate < #" & Date() & "#"),0)) AS PastDueBalance, DMax("BillDate","BillT","PayeeID=" & [PayeeID]) AS LastBill, DMax("PaymentDate","PaymentsByPayeeQ","PayeeID=" & [PayeeID]) AS LastPayment, PayeeT.*
FROM PayeeT;
I GET THE ERROR MESSAGE 'THE SUM FUNCTION REQUIRES 1 ARGUEMENT (#174).
Can you help me with this one? Thank you very much, in advance.
Richard Rost  @Reply  
          
5 years ago
It's difficult to tell because by itself that SQL is almost meaningless to me. However, if this is for a pass-thru query to SQL Server, then your dates should be enclosed in single quotes '1/1/2000' and not #1/1/2000# like Access uses.
Despina Karayanni OP  @Reply  
      
5 years ago
Thank you for your answer. Actually, I modified the Query in an aggregate query. And it worked fine!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access SQL Server Lessons.
 

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: 5/6/2026 10:11:04 AM. PLT: 1s