new_2_prog
Registered User.
- Local time
- Today, 14:23
- Joined
- Aug 4, 2008
- Messages
- 58
Ok, guess I am having a brain fart of the day.
I created a table that determines the current monday of the week and then 12 mondays ago to be put in table "export_Thruput_Dates" with columns enddate, begindate respectively.
Then I need to run a query "qry_summary" that takes data from table "tbl_Master" but I only want the data between the dates in the "export_Thruput_Dates".
qry_summary:
SELECT tbl_Master.Dept, tbl_Master.MondayDate, Count(tbl_Master.Shift) AS ShiftsWorked, Sum(tbl_Master.cntMachine) AS SumOfcntMachine
FROM tbl_Master
GROUP BY tbl_Master.Dept, tbl_Master.MondayDate
HAVING (((tbl_Master.Dept)="x") AND ((tbl_Master.MondayDate) Between [tables]![export_Thruput_Dates]![BeginDate] And [tables]![export_Thruput_Dates]![EndDate]))
ORDER BY tbl_Master.Dept, tbl_Master.MondayDate;
I run the query and I get input boxes to put dates in for enddate and begindate - why isn't it using the dates in the table?
Thanks!
I created a table that determines the current monday of the week and then 12 mondays ago to be put in table "export_Thruput_Dates" with columns enddate, begindate respectively.
Then I need to run a query "qry_summary" that takes data from table "tbl_Master" but I only want the data between the dates in the "export_Thruput_Dates".
qry_summary:
SELECT tbl_Master.Dept, tbl_Master.MondayDate, Count(tbl_Master.Shift) AS ShiftsWorked, Sum(tbl_Master.cntMachine) AS SumOfcntMachine
FROM tbl_Master
GROUP BY tbl_Master.Dept, tbl_Master.MondayDate
HAVING (((tbl_Master.Dept)="x") AND ((tbl_Master.MondayDate) Between [tables]![export_Thruput_Dates]![BeginDate] And [tables]![export_Thruput_Dates]![EndDate]))
ORDER BY tbl_Master.Dept, tbl_Master.MondayDate;
I run the query and I get input boxes to put dates in for enddate and begindate - why isn't it using the dates in the table?
Thanks!