Balance: (SELECT SUM([Invoice Amount]-[Payment Amount])
FROM
Invoice_Payment WHERE
Invoice_Payment.Customer ID<='001')
Table Name is Invoice_payment
Its says syntax error while running
Explain the wrong syntax pls
Balance: (SELECT SUM([Invoice Amount]-[Payment Amount])
FROM
Invoice_Payment WHERE
Invoice_Payment.Customer ID<='001')
Table Name is Invoice_payment
Its says syntax error while running
Explain the wrong syntax pls
Where are you trying to use this expression
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Agree - usage not clear.
If you use an aggregate function in sql, you have to give the result an alias name. If that is what you have in sql view, then add an alias - e.g.
SELECT SUM([Invoice Amount]-[Payment Amount]) AS Balance
FROM...
Last edited by Micron; 07-11-2021 at 08:51 AM.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Think this is in a query view. Looks to me like there is a space before ID
Try:
Invoice_Payment.[Customer ID]
Best to avoid spaces and punctuation/special characters in naming convention.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank You ,
Best Regards
Yes Correct,
Thank for the Advice
Yes You are correct
Tks for the Advice
I would hope CustomerID would also be numeric?, so no ' around the value?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
The id example is ‘001’ so the preceding zeros make it text - unless there is table formatting or lookups being used