DSum alternative?

G

Guest

I'm working on a database that tracks our warehouse employee's productivity.
While everything else is going great, I'm having a problem I'm hoping I can
find some help with.

The database stores the area they worked in, such as Shipping or Palletizer,
and in another field is how many hours they worked for their shift. My
problem is that I've tried DSum to count hours:

=DSum("[Shift_ID1_Hours]+[Shift_ID2_Hours]","[EFF-Performance]","[Area]='Shipping'")

And it only counts ALL the hours for everyone, and displays them when using
that line, and I need it to display only the total for the records shown.

My report looks something like this:

Employee Name - Assigned Shift
Date Worked - Area worked - # Hours Worked - Various statistics on pallets
handled
(Repeat above line for all dates requested)
Summary of above info
Report Footer, summarizing it all

Is there any alternatives to DSum that will do the trick for me?

Thank you so much in advance!
Steph
 
J

John Spencer

Perhaps all you need is to use the SUM function in summary and report
summary areas. Your description of your problem is not all theat clear.
A control in the group footer with this as its source should do what you
want.
=Sum([Shift_ID1_Hours]) + Sum([Shift_ID2_Hours])
 
G

Guest

Sorry, John... Maybe this will make it a little more clear. :) I've had a
heck of a time trying to explain this one...

For every employee's days worked, it stores how many hours he worked
(Regular and Overtime) as well as the area he worked in - "Shipping" is the
one I've been using as an example (There are 3 more areas, palletizer,
depalletizer and receiving).

What I was using DSum for was to look at the area the employee worked, then
get a total for only that area. So if the report came up with 4 people, 2 of
them worked on the Palletizer and 2 of them in Shipping, it would give me a
total hours for each area. For example, 32 hours are worked with 4 people:
16 hours in shipping and 16 hours at the palletizer (assuming no overtime).
Since I found DSum works before grouping, it's adding up ALL hours in my
table for people that worked in the area I specify, and not just the hours
for what's displayed in the report.

The current problem with using total hours, is that the report footer is
reporting inaccurate figures. With my example above, if shipping handled 200
pallets, then out of 32 hours, the report shows that they handled 6.25
pallets an hour. But since only 16 of those hours are actually in shipping,
and 16 of them are elsewhere, the true results should be that they handled
12.5 pallets an hour.

Thank you for your reply, and I truly hope I was able to explain it better
this time. :)
Stephanie

John Spencer said:
Perhaps all you need is to use the SUM function in summary and report
summary areas. Your description of your problem is not all theat clear.
A control in the group footer with this as its source should do what you
want.
=Sum([Shift_ID1_Hours]) + Sum([Shift_ID2_Hours])


Luna Saisho said:
I'm working on a database that tracks our warehouse employee's
productivity.
While everything else is going great, I'm having a problem I'm hoping I
can
find some help with.

The database stores the area they worked in, such as Shipping or
Palletizer,
and in another field is how many hours they worked for their shift. My
problem is that I've tried DSum to count hours:

=DSum("[Shift_ID1_Hours]+[Shift_ID2_Hours]","[EFF-Performance]","[Area]='Shipping'")

And it only counts ALL the hours for everyone, and displays them when
using
that line, and I need it to display only the total for the records shown.

My report looks something like this:

Employee Name - Assigned Shift
Date Worked - Area worked - # Hours Worked - Various statistics on pallets
handled
(Repeat above line for all dates requested)
Summary of above info
Report Footer, summarizing it all

Is there any alternatives to DSum that will do the trick for me?

Thank you so much in advance!
Steph
 
S

Steve Schapel

Steph,

By the way, just a hint for the future... If you really feel you want
your question to be seen in more than one newsgroup (in practice this is
seldom necessary), it is better to cross-post (i.e. address the same
message simultaneously to both groups), rather than multi-post (i.e.
post separately to each group). Thanks.
 
G

Guest

Hi,

Yes, I know you're right and I do apologize for it. I just ... stupidly ...
kept thinking of better ways to describe things, and realizing I did it in
the wrong area really in the first place... And I did get an answer in what I
think was the correct place to post my problem.

Thanks for all your help :)
Steph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top