D
Dave the Wave
I have a summary query that works great. It sums the various costs of
a sale and gives me a total as deisred. I want to know the profit, so
I try to calculate it by Profit:=[SalePrice]-[SumOfCost].
When I run the query, Access treats the [SumOfCost] like a parameter.
I don't enter a value, just hit enter, and the query calculates the
correct profit answer. Why would access insist the calculated field is
a parameter that needs to be entered?
Here is the SQL of the query:
SELECT DISTINCTROW tblSale.tblSaleID, tblSale.tblListingID,
tblSale.tblSalePrice, tblSale.tblSalePaid, Sum(tblCost.tblCostAmount)
AS SumOftblCostAmount, [tblSalePrice]-[SumOftblCostAmount] AS Profit
FROM (tblListing INNER JOIN tblSale ON tblListing.tblListingID =
tblSale.tblListingID) INNER JOIN tblCost ON tblListing.tblListingID =
tblCost.tblListingID
GROUP BY tblSale.tblSaleID, tblSale.tblListingID,
tblSale.tblSalePrice, tblSale.tblSalePaid,
[tblSalePrice]-[SumOftblCostAmount];
ps. I used the "Build.." feature to insure the problem isn't a typo.
Thanks for your time and assistance!
David G.
a sale and gives me a total as deisred. I want to know the profit, so
I try to calculate it by Profit:=[SalePrice]-[SumOfCost].
When I run the query, Access treats the [SumOfCost] like a parameter.
I don't enter a value, just hit enter, and the query calculates the
correct profit answer. Why would access insist the calculated field is
a parameter that needs to be entered?
Here is the SQL of the query:
SELECT DISTINCTROW tblSale.tblSaleID, tblSale.tblListingID,
tblSale.tblSalePrice, tblSale.tblSalePaid, Sum(tblCost.tblCostAmount)
AS SumOftblCostAmount, [tblSalePrice]-[SumOftblCostAmount] AS Profit
FROM (tblListing INNER JOIN tblSale ON tblListing.tblListingID =
tblSale.tblListingID) INNER JOIN tblCost ON tblListing.tblListingID =
tblCost.tblListingID
GROUP BY tblSale.tblSaleID, tblSale.tblListingID,
tblSale.tblSalePrice, tblSale.tblSalePaid,
[tblSalePrice]-[SumOftblCostAmount];
ps. I used the "Build.." feature to insure the problem isn't a typo.
Thanks for your time and assistance!
David G.