By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Sum of records from querry

P: n/a
I need the correct format to sum the following fields.
ReportMon.PayHrs + ReportTue.PayHrs + ReportWed.PayHrs Etc.

Thanks

Charles

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 25 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Wed, 25 Jul 2007 01:12:21 GMT, "CharlesCount via AccessMonster.com"
<u35616@uwewrote:

The reason this is so complicated for you is because you appear to
have an incorrect database design, violating normalization rules.
Once you have fixed that, perhaps by creating a SINGLE table like
this:
EmployeeID
PayDate
PayHours
the query becomes trivial:
select EmployeeID, Sum(PayHours)
from tblHoursWorked
where PayDate between '7/1/07' and '8/1/07'
group by EmployeeID

-Tom.
>I need the correct format to sum the following fields.
ReportMon.PayHrs + ReportTue.PayHrs + ReportWed.PayHrs Etc.

Thanks

Charles
Jul 25 '07 #2

P: n/a
The table is very similar to what you describe.
I want to be able to develop a report to view any 7 days of work with the sum
on the right side for each employee (weekly pay hours) and group total at
the bottom for each day.
I have laid out the infomation the way I want it by using a query for each
day of the week and link them to an employee info table with the EmplID
Number but I have problems with the sum because of the period between
ReportMon query and the field name.

Thanks

Charles

Tom van Stiphout wrote:
>The reason this is so complicated for you is because you appear to
have an incorrect database design, violating normalization rules.
Once you have fixed that, perhaps by creating a SINGLE table like
this:
EmployeeID
PayDate
PayHours
the query becomes trivial:
select EmployeeID, Sum(PayHours)
from tblHoursWorked
where PayDate between '7/1/07' and '8/1/07'
group by EmployeeID

-Tom.
>>I need the correct format to sum the following fields.
ReportMon.PayHrs + ReportTue.PayHrs + ReportWed.PayHrs Etc.

Thanks

Charles
--
Charles

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 25 '07 #3

P: n/a
On Wed, 25 Jul 2007 04:00:38 GMT, "CharlesCount via AccessMonster.com"
<u35616@uwewrote:

Did you consider a crosstab query on the base table? The query wizard
helps you set one up.

-Tom.

>The table is very similar to what you describe.
I want to be able to develop a report to view any 7 days of work with the sum
on the right side for each employee (weekly pay hours) and group total at
the bottom for each day.
I have laid out the infomation the way I want it by using a query for each
day of the week and link them to an employee info table with the EmplID
Number but I have problems with the sum because of the period between
ReportMon query and the field name.

Thanks

Charles

Tom van Stiphout wrote:
>>The reason this is so complicated for you is because you appear to
have an incorrect database design, violating normalization rules.
Once you have fixed that, perhaps by creating a SINGLE table like
this:
EmployeeID
PayDate
PayHours
the query becomes trivial:
select EmployeeID, Sum(PayHours)
from tblHoursWorked
where PayDate between '7/1/07' and '8/1/07'
group by EmployeeID

-Tom.
>>>I need the correct format to sum the following fields.
ReportMon.PayHrs + ReportTue.PayHrs + ReportWed.PayHrs Etc.

Thanks

Charles
Jul 25 '07 #4

P: n/a
Thanks for the suggestion
I am going to out put the information to xls and do the sum at that point

Thanks again
Charles
Tom van Stiphout wrote:
>Did you consider a crosstab query on the base table? The query wizard
helps you set one up.

-Tom.
>>The table is very similar to what you describe.
I want to be able to develop a report to view any 7 days of work with the sum
[quoted text clipped - 30 lines]
>>>>
Charles
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 25 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.