S
SSi308
I created a form called frmWeeklyReport and added 2 unbound text boxes
one for start date and one for end date. There is also a button that is set
to run the report. I open the form, enter the dates and click the button. I
then get an Enter Parameter Value dialog box Start Date and End Date.
My Report includes a main report and a subreport each based on different
queries.
I think I know where to look for the error, but am not sure what to look
for. When running each query directly, with the form open and the dates
filled in, the first query is fine, but the second query is prompting for a
Start and End Date twice. I believe I entered the parameters the same in
each query and have compared them and do not see any differences, except the
table.field information. Here is the SQL View.
SELECT Employees.Department, Employees.Initials
, Sum(ContractsAndHours.DailyHours) AS TotalHoursWorked
, Sum(ContractsAndHours.OutNewBusiness) AS NBOut
, Sum(ContractsAndHours.OutRenewal) AS RnwlOut
, Sum(ContractsAndHours.InNewBusiness) AS NBIn
, Sum(ContractsAndHours.InRenewal) AS RnwlIn
, [TotalHoursWorked]/8 AS EquivDays
, CallsPerDay.[Out Calls]
, CallsPerDay.[In Calls]
, CallsPerDay.[Calls 3+]
, ([Out Calls]/[EquivDays]) AS [Avg Out Calls]
, ([In Calls]/[EquivDays]) AS [Avg In Calls]
, ([Calls 3+]/[EquivDays]) AS [Avg 3+ Calls]
FROM (ContractsAndHours INNER JOIN Employees ON ContractsAndHours.EmpID =
Employees.EmpID) INNER JOIN CallsPerDay ON Employees.EmpID = CallsPerDay.EmpID
WHERE
(((ContractsAndHours.DateOfRecord)>=[Forms]![frmWeeklyReport]![txtStartDate]
And
(ContractsAndHours.DateOfRecord)<DateAdd("d",1,[Forms]![frmWeeklyReport]![txtEndDate])))
GROUP BY Employees.Department, Employees.Initials, CallsPerDay.[Out Calls],
CallsPerDay.[In Calls], CallsPerDay.[Calls 3+];
Any help is appreciated.
Lori
one for start date and one for end date. There is also a button that is set
to run the report. I open the form, enter the dates and click the button. I
then get an Enter Parameter Value dialog box Start Date and End Date.
My Report includes a main report and a subreport each based on different
queries.
I think I know where to look for the error, but am not sure what to look
for. When running each query directly, with the form open and the dates
filled in, the first query is fine, but the second query is prompting for a
Start and End Date twice. I believe I entered the parameters the same in
each query and have compared them and do not see any differences, except the
table.field information. Here is the SQL View.
SELECT Employees.Department, Employees.Initials
, Sum(ContractsAndHours.DailyHours) AS TotalHoursWorked
, Sum(ContractsAndHours.OutNewBusiness) AS NBOut
, Sum(ContractsAndHours.OutRenewal) AS RnwlOut
, Sum(ContractsAndHours.InNewBusiness) AS NBIn
, Sum(ContractsAndHours.InRenewal) AS RnwlIn
, [TotalHoursWorked]/8 AS EquivDays
, CallsPerDay.[Out Calls]
, CallsPerDay.[In Calls]
, CallsPerDay.[Calls 3+]
, ([Out Calls]/[EquivDays]) AS [Avg Out Calls]
, ([In Calls]/[EquivDays]) AS [Avg In Calls]
, ([Calls 3+]/[EquivDays]) AS [Avg 3+ Calls]
FROM (ContractsAndHours INNER JOIN Employees ON ContractsAndHours.EmpID =
Employees.EmpID) INNER JOIN CallsPerDay ON Employees.EmpID = CallsPerDay.EmpID
WHERE
(((ContractsAndHours.DateOfRecord)>=[Forms]![frmWeeklyReport]![txtStartDate]
And
(ContractsAndHours.DateOfRecord)<DateAdd("d",1,[Forms]![frmWeeklyReport]![txtEndDate])))
GROUP BY Employees.Department, Employees.Initials, CallsPerDay.[Out Calls],
CallsPerDay.[In Calls], CallsPerDay.[Calls 3+];
Any help is appreciated.
Lori