Hi
I'm trying to create a chart from the following query:
SELECT tblEST.Finished, tblEST.STA, tblEST.VEH_MAK
FROM tblEST
GROUP BY tblEST.Finished, tblEST.STA, tblEST.VEH_MAK
HAVING (((tblEST.Finished)>=[forms]![frmStatus]![txtDateFrom] And (tblEST.Finished)<=[forms]![frmStatus]![txtDateTo]) AND ((tblEST.STA)="F") AND ((tblEST.VEH_MAK)=[forms]![frmStatus]![lstVehTrend]));
I need the months along the bottom and the count of vehicles in the detail, so if I select 01/01/2010 thru 30/06/2010 I will see 6 months of trend.
I'm struggling ..............
Monthly Trend
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Monthly Trend
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78523
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Monthly Trend
Hi Dave,
I think you need a query like this:
SELECT tblEST.Finished, Count(*) AS NumberOfVehicles
FROM tblEST
WHERE (tblEST.Finished Between [Forms]![frmStatus]![txtDateFrom] And [Forms]![frmStatus]![txtDateTo]) AND (tblEST.STA="F") AND (tblEST.VEH_MAK=[Forms]![frmStatus]![lstVehTrend])
GROUP BY tblEST.Finished
I think you need a query like this:
SELECT tblEST.Finished, Count(*) AS NumberOfVehicles
FROM tblEST
WHERE (tblEST.Finished Between [Forms]![frmStatus]![txtDateFrom] And [Forms]![frmStatus]![txtDateTo]) AND (tblEST.STA="F") AND (tblEST.VEH_MAK=[Forms]![frmStatus]![lstVehTrend])
GROUP BY tblEST.Finished
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Monthly Trend
Brilliant Hans..
I can use this template for other graph's I'm working on.
Are you watching the Footie ??
Regards
I can use this template for other graph's I'm working on.
Are you watching the Footie ??
Regards
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78523
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Monthly Trend
Frankly, I'm not much interested in football, but it's great that both England and The Netherlands are through.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
-
- Administrator
- Posts: 78523
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Monthly Trend
Have a great weekend too! (It has finally, finally become summer here)
Best wishes,
Hans
Hans