A
Ann Scharpf
Hi,
I have a query that is prompting me for a parameter when I run it. I can
just click OK and the query calculates the correct results.
Here is the SQL code for my query.
SELECT SchedulingFundedHrs.VendorName, SchedulingCosts1.Project,
SchedulingCosts1.Vendor, Sum(SchedulingCosts1.TotalHours) AS SumOfTotalHours,
Sum(SchedulingCosts1.Cost) AS CostToDate,
SchedulingFundedHrs.FYDollarsFunded, [FYDollarsFunded]-[CostToDate] AS
AmtRemaining
FROM SchedulingCosts1 LEFT JOIN SchedulingFundedHrs ON
SchedulingCosts1.Project = SchedulingFundedHrs.ProjectCode
GROUP BY SchedulingFundedHrs.VendorName, SchedulingCosts1.Project,
SchedulingCosts1.Vendor, SchedulingFundedHrs.FYDollarsFunded,
[FYDollarsFunded]-[CostToDate];
I did see a post from last May by Klatuu about adding the alias for the
expression to the end of the SQL. I tried adding "AS AmtRemaining" to the
very end of my SQL and got the following error:
Syntax error (missing operator) in query expression
'[FYDollarsFunded]-[CostToDate] AS AmtRemaining'.
Can anyone please tell me how to get Access to stop prompting for the
CostToDate?
Thanks.
I have a query that is prompting me for a parameter when I run it. I can
just click OK and the query calculates the correct results.
Here is the SQL code for my query.
SELECT SchedulingFundedHrs.VendorName, SchedulingCosts1.Project,
SchedulingCosts1.Vendor, Sum(SchedulingCosts1.TotalHours) AS SumOfTotalHours,
Sum(SchedulingCosts1.Cost) AS CostToDate,
SchedulingFundedHrs.FYDollarsFunded, [FYDollarsFunded]-[CostToDate] AS
AmtRemaining
FROM SchedulingCosts1 LEFT JOIN SchedulingFundedHrs ON
SchedulingCosts1.Project = SchedulingFundedHrs.ProjectCode
GROUP BY SchedulingFundedHrs.VendorName, SchedulingCosts1.Project,
SchedulingCosts1.Vendor, SchedulingFundedHrs.FYDollarsFunded,
[FYDollarsFunded]-[CostToDate];
I did see a post from last May by Klatuu about adding the alias for the
expression to the end of the SQL. I tried adding "AS AmtRemaining" to the
very end of my SQL and got the following error:
Syntax error (missing operator) in query expression
'[FYDollarsFunded]-[CostToDate] AS AmtRemaining'.
Can anyone please tell me how to get Access to stop prompting for the
CostToDate?
Thanks.