hello,
I have this report and need to add totals for each person (the red circle)
I cannot change the existing report so I export data from MS SQL to MS Access and create a new report there. I got it working for one employee but have trouble with a query which would for multiple employees.
This query extract data use as input:
SELECT[TIME].[RCD_NUM],[TIME].[EMP_ID],[TIME].[PPERIOD],[TIME].[PRUN],[TIME].[TDATE],[TIME].[PC],[TIME].[RATE],[TIME].[HOURS],[TIME].[AMOUNT],[TIME].[JOB_ID],[TIME].[UPDATED],[TIME].[UPDATED_BY],[TIME].[LOG_DATE],[TIME].[ORIGINAL_REC_NUM]
FROM[TIME]
WHERE((([TIME].[EMP_ID])=376)And(([TIME].[TDATE])<=#12/31/2006#And([TIME].[TDATE])>=#1/1/2006#)And(([TIME].[PC])<599));
this query populates the report:
SELECT*
FROM TIME1
WHERE RCD_NUM =(SELECT Max(RCD_NUM)FROM[TIME1] UQ WHERE UQ.PPERIOD =[TIME1].PPERIOD AND UQ.PC =[TIME1].PC);
the problem is if I remove EMP_ID from the first query like this
SELECT[TIME].[RCD_NUM],[TIME].[EMP_ID],[TIME].[PPERIOD],[TIME].[PRUN],[TIME].[TDATE],[TIME].[PC],[TIME].[RATE],[TIME].[HOURS],[TIME].[AMOUNT],[TIME].[JOB_ID],[TIME].[UPDATED],[TIME].[UPDATED_BY],[TIME].[LOG_DATE],[TIME].[ORIGINAL_REC_NUM]
FROM[TIME]
WHERE((([TIME].[TDATE])<=#12/31/2006#And([TIME].[TDATE])>=#1/1/2006#)And(([TIME].[PC])<599));
then the second query doesn't work and ms access freezes when running this query.
any help/idea please?