Z
Zimme
Hello:
Best wishes and thank you all for your previous assistance.
I have another situation where I would like to filter the master database
records by selecting the records by (x) number of days from the maximum date.
I reviewed the query date discussions here and come up with the following:
SELECT qryOper.ProductionDay, qryOper.TheHr, Sum(qryOper.Volume)
FROM qryOper
WHERE (((Weekday([productionday],2))<6))
GROUP BY qryOper.ProductionDay, qryOper.TheHr
HAVING (((qryOper.ProductionDay) Between
DateAdd("d",-7,Max([ProductionDay])) And Max([ProductionDay])));
a sample query for 7 days back from the maximum production day. But instead
of seeing the “7†days, I got the whole database dates. What did I do wrong?
Thanks again for your reviewing.
Best wishes and thank you all for your previous assistance.
I have another situation where I would like to filter the master database
records by selecting the records by (x) number of days from the maximum date.
I reviewed the query date discussions here and come up with the following:
SELECT qryOper.ProductionDay, qryOper.TheHr, Sum(qryOper.Volume)
FROM qryOper
WHERE (((Weekday([productionday],2))<6))
GROUP BY qryOper.ProductionDay, qryOper.TheHr
HAVING (((qryOper.ProductionDay) Between
DateAdd("d",-7,Max([ProductionDay])) And Max([ProductionDay])));
a sample query for 7 days back from the maximum production day. But instead
of seeing the “7†days, I got the whole database dates. What did I do wrong?
Thanks again for your reviewing.