J
Jan Il
Hi all - Access 2002 - WinME
I have a report based on a query. I have a form from which the data is
sorted for another Form by Employee Name, Contractor Name, Job Location, and
Job Type, via command buttons for each category. There's also From and To
date period controls. Any combination of the categories and date periods
selected can be sued to sort the data in the second Form. There is a command
button on the Form that opens the report for preview, and one to print the
report. The filter form sorts the records perfectly, and they are displayed
as they should be according to the selections entered on the filter form.
However, the report does will not filter the records according the to Form.
It will display the correct date period on the report as it is on the form,
but, it will not limit the list of records to the correct sorting.
I have recreated the form, query and report form several times, and it still
will not sort properly. I have gone over everything I can think of, and I
can't find the problem. I am not sure if it is in the query since it works
properly with the Form, but, I can't find anything in the report form that
might be causing the problem. The SQL for the query the form and report are
based upon is as follows;
SELECT tblLaborCosts.EmpName, tblLaborCosts.EmpID, tblLaborCosts.JobDate,
tblLaborCosts.ContractorName, tblLaborCosts.JobType,
tblLaborCosts.JobLocation, tblLaborCosts.Manhours, tblLaborCosts.HourlyRate,
Sum([Manhours]*[HourlyRate]) AS TotalCost
FROM tblLaborCosts
GROUP BY tblLaborCosts.EmpName, tblLaborCosts.EmpID, tblLaborCosts.JobDate,
tblLaborCosts.ContractorName, tblLaborCosts.JobType,
tblLaborCosts.JobLocation, tblLaborCosts.Manhours, tblLaborCosts.HourlyRate
HAVING (((tblLaborCosts.JobDate) Between [Forms]![frmLaborFilter]![Text62]
And [Forms]![frmLaborFilter]![Text64])) OR
((([Forms]![frmLaborFilter]![Text62]) Is Null)) OR
((([Forms]![frmLaborFilter]![Text64]) Is Null));
Is three something I set up wrong that prevents the report from sorting in
accordance with the form data?
Cheers, and Happy Holidays!
Jan
I have a report based on a query. I have a form from which the data is
sorted for another Form by Employee Name, Contractor Name, Job Location, and
Job Type, via command buttons for each category. There's also From and To
date period controls. Any combination of the categories and date periods
selected can be sued to sort the data in the second Form. There is a command
button on the Form that opens the report for preview, and one to print the
report. The filter form sorts the records perfectly, and they are displayed
as they should be according to the selections entered on the filter form.
However, the report does will not filter the records according the to Form.
It will display the correct date period on the report as it is on the form,
but, it will not limit the list of records to the correct sorting.
I have recreated the form, query and report form several times, and it still
will not sort properly. I have gone over everything I can think of, and I
can't find the problem. I am not sure if it is in the query since it works
properly with the Form, but, I can't find anything in the report form that
might be causing the problem. The SQL for the query the form and report are
based upon is as follows;
SELECT tblLaborCosts.EmpName, tblLaborCosts.EmpID, tblLaborCosts.JobDate,
tblLaborCosts.ContractorName, tblLaborCosts.JobType,
tblLaborCosts.JobLocation, tblLaborCosts.Manhours, tblLaborCosts.HourlyRate,
Sum([Manhours]*[HourlyRate]) AS TotalCost
FROM tblLaborCosts
GROUP BY tblLaborCosts.EmpName, tblLaborCosts.EmpID, tblLaborCosts.JobDate,
tblLaborCosts.ContractorName, tblLaborCosts.JobType,
tblLaborCosts.JobLocation, tblLaborCosts.Manhours, tblLaborCosts.HourlyRate
HAVING (((tblLaborCosts.JobDate) Between [Forms]![frmLaborFilter]![Text62]
And [Forms]![frmLaborFilter]![Text64])) OR
((([Forms]![frmLaborFilter]![Text62]) Is Null)) OR
((([Forms]![frmLaborFilter]![Text64]) Is Null));
Is three something I set up wrong that prevents the report from sorting in
accordance with the form data?
Cheers, and Happy Holidays!
Jan