I am trying to run the qry below against an access database and I get an error No value Given for the required parameter?
SELECT ID, DateColumn, Less90, Between90180, Between180365, GreaterThan365, SUM(Less90) + SUM(Between90180) + SUM(Between180365) + SUM(GreaterThan365)
AS Total, SUM(Between180365) / Total AS Expr1,
(SELECT SUM(Between180365) / (SUM(Less90) + SUM(Between90180) + SUM(Between180365) + SUM(GreaterThan365))
FROM tblHandpieceFaliuresAge T2
WHERE T2.ID <= tblHandpieceFaliuresAge.ID) AS RunningSum
FROM tblHandpieceFaliuresAge
GROUP BY ID, DateColumn, Less90, Between90180, Between180365, GreaterThan365
You have typed one of your columns incorrectly, and Access thinks you are trying to pass a parameter.
Go over your field names again and make sure they have all been entered correctly.
I believe the problem may be this:
And then you refer to it later as
Totalhere:Access can’t take the alias and re-use it in the query, you need this:
Also make sure you handle the denominator so you don’t divide by zero.