Re: Need to search by date, but do not want the date reflected in results
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Thu, 3 Nov 2005 20:51:56 +0800
Drag the OrderDate field into the grid a 2nd time.
In the Total row under this field, change Group BY to Where.
Remove the criteria from the earlier field, and put them here.
You should end up with a SQL statement that has a WHERE clause in the middle
instead of a HAVING clause at the end.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Michael" <michael@xxxxxxxxxxxxx> wrote in message
news:e1IGtEH4FHA.2424@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks Allen
> Using the following SQL, I can limit the dates shown and that is helpful,
> but when I open the range to include all the items or even only two days,
> the items that have entries on 2 different days will still show the total
> for those days and not one total for all consumed.
> Michael
>
> PARAMETERS [Forms].[frmWhatDateConsume].[txtStartDate] DateTime,
> [Forms].[frmWhatDateConsume].[txtEndDate] DateTime;
> SELECT Sum(([colli x Pedana]*[desc])) AS vas, consumenew.confezione,
> Sum(consumenew.[consume film]) AS [SumOfconsume film]
> FROM consumenew
> GROUP BY consumenew.confezione, consumenew.orderdate
> HAVING (((consumenew.orderdate) Between
> [Forms].[frmWhatDateConsume].[txtStartDate] And
> [Forms].[frmWhatDateConsume].[txtEndDate]));
.
- Follow-Ups:
- References:
- Need to search by date, but do not want the date reflected in results
- From: Michael
- Re: Need to search by date, but do not want the date reflected in results
- From: Allen Browne
- Re: Need to search by date, but do not want the date reflected in results
- From: Michael
- Re: Need to search by date, but do not want the date reflected in results
- From: Allen Browne
- Re: Need to search by date, but do not want the date reflected in results
- From: Michael
- Need to search by date, but do not want the date reflected in results
- Prev by Date: Re: Reference a Field not on the report
- Next by Date: Re: Reference a Field not on the report
- Previous by thread: Re: Need to search by date, but do not want the date reflected in results
- Next by thread: Re: Need to search by date, but do not want the date reflected in results
- Index(es):
Relevant Pages
|