D
DIH
Hi all,
I have a query that gives me a month to date efficiency %.
The user selects a date from a control called, "cboDate" in a form
called, "frmDailyProdReport". The query will use that date as the end
date and the 1st of the month (that it's in) as the start date. This
obviously returns just a single value. What I would like to do is get a
running month to date for each day so you could see the month to date
for the 1st, the 2nd, the 3rd etc. up to the date selected in the
control. Below is the SQL for the original (single value)query.
SELECT Sum([DAILY SHIFT]!ACTUAL)/Sum([DAILY SHIFT]!THEORETICAL) AS
Efficiency, [DAILY SHIFT].DATEofPROD
FROM [DAILY SHIFT]
GROUP BY [DAILY SHIFT].DATEofPROD
HAVING ((([DAILY SHIFT].DATEofPROD) Between
DateAdd("d",1-DatePart("d",[forms]![frmDailyProdReport]![cboDate]),[forms]![frmDailyProdReport]![cboDate])
And [forms]![frmDailyProdReport]![cboDate]));
Any help would be greatly appreciated.
I have a query that gives me a month to date efficiency %.
The user selects a date from a control called, "cboDate" in a form
called, "frmDailyProdReport". The query will use that date as the end
date and the 1st of the month (that it's in) as the start date. This
obviously returns just a single value. What I would like to do is get a
running month to date for each day so you could see the month to date
for the 1st, the 2nd, the 3rd etc. up to the date selected in the
control. Below is the SQL for the original (single value)query.
SELECT Sum([DAILY SHIFT]!ACTUAL)/Sum([DAILY SHIFT]!THEORETICAL) AS
Efficiency, [DAILY SHIFT].DATEofPROD
FROM [DAILY SHIFT]
GROUP BY [DAILY SHIFT].DATEofPROD
HAVING ((([DAILY SHIFT].DATEofPROD) Between
DateAdd("d",1-DatePart("d",[forms]![frmDailyProdReport]![cboDate]),[forms]![frmDailyProdReport]![cboDate])
And [forms]![frmDailyProdReport]![cboDate]));
Any help would be greatly appreciated.