Re: Getting latest count quantities
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 04/05/04
- Next message: Michel Walsh: "Re: count empty boxes"
- Previous message: Michel Walsh: "Re: Please Help"
- In reply to: Mark: "Getting latest count quantities"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 5 Apr 2004 06:20:21 -0400
Hi,
You are missing a GROUP BY clause and/or aggregates. You probably
miss:
GROUP BY tblResources.ResourceName
but there is still the problem with tblStockTake.Quantity
Take a look at http://www.mvps.org/access/queries/qry0020.htm
In a Total query, each field in the SELECT clause must be aggregated
(MIN, MAX, COUNT, SUM, FIRST, LAST, ... ) or appear in the GROUP BY clause.
Hoping it may help,
Vanderghast, Access MVP
"Mark" <mark_goode@wsahs.nsw.gov.au> wrote in message
news:vst170hl9gkfrsavff1tbierqhcl827v8e@4ax.com...
> Hello All,
> I'm trying to get the latest stocktake quantity and the latest
> stocktake date from my tables.
> Where am I going wrong?
> Thanks,
> Mark
> The below is from the SQL view of my query
> SELECT tblResources.ResourceName, Max([tblStockTake].[StockTakeDate])
> AS CountDate, tblStockTake.Quantity
> FROM tblResources INNER JOIN tblStockTake ON tblResources.ResourceID =
> tblStockTake.ResourceID;
>
- Next message: Michel Walsh: "Re: count empty boxes"
- Previous message: Michel Walsh: "Re: Please Help"
- In reply to: Mark: "Getting latest count quantities"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|