D
DaveF
I have the following subquery:
SELECT coin.coin
, coin.size & " " & coin.coin AS CoinSize
, coin.troyounces
, inventory.mintyear
, inventory.totalcost
, inventory.quantity
, inventory.quantity - (SELECT count(inventoryid) FROM disposal WHERE disposal.inventoryid=inventory.inventoryid) As NetQty
, location.location
, inventory.buydate
, inventory.locationid
, Format$([buydate],"dd mmmm yyyy",0,0) AS fBuyDate
FROM location INNER JOIN (coin INNER JOIN inventory ON coin.coinid = inventory.coinid) ON location.locationid = inventory.locationid WHERE inventory.locationid IN (2) AND coin.metal = 2;
I can execute this query without porblem. But when I use it as the RecordSource for a report I get the error:
Multi-level Group By Clause is not allowed in a subquery
I can eliminate the error by not referencing the NetQty field (calculated above with the sub-SELECT) in the Detail section of the report.
The report has no groupings, only the detail and page header and report footer sections.
Is there any work around that will allow me to reference this value in my report?
SELECT coin.coin
, coin.size & " " & coin.coin AS CoinSize
, coin.troyounces
, inventory.mintyear
, inventory.totalcost
, inventory.quantity
, inventory.quantity - (SELECT count(inventoryid) FROM disposal WHERE disposal.inventoryid=inventory.inventoryid) As NetQty
, location.location
, inventory.buydate
, inventory.locationid
, Format$([buydate],"dd mmmm yyyy",0,0) AS fBuyDate
FROM location INNER JOIN (coin INNER JOIN inventory ON coin.coinid = inventory.coinid) ON location.locationid = inventory.locationid WHERE inventory.locationid IN (2) AND coin.metal = 2;
I can execute this query without porblem. But when I use it as the RecordSource for a report I get the error:
Multi-level Group By Clause is not allowed in a subquery
I can eliminate the error by not referencing the NetQty field (calculated above with the sub-SELECT) in the Detail section of the report.
The report has no groupings, only the detail and page header and report footer sections.
Is there any work around that will allow me to reference this value in my report?