View Single Post
  #18  
Old April 21st, 2006, 01:28 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default I'm stuck can not get total sum correct

What sample are you looking for I have tried =count([Department]),
=Sum(IIf([Department]="1",[EmployeeID],0))
=IIf(Count([Department]) =0))
=Sum(IIf([department]= "42200",1,0)
=Sum(nz([Department]))
For all these attempts I get and error in returned.
LHEMA


"Duane Hookom" wrote:

I don't see any sample records or how you would want to display these with
your calculated totals in your report. Could you take the time to manually
type a few records into a reply so that we can "see" what you want rather
than attempting to understand your description.
--
Duane Hookom
MS Access MVP

"LHEMA" wrote in message
...
What I want is to total each department separately...right now employee
total
is working great using the expression =count([employeeID]) but how can I
get
the department to do the same. Using this expression =count([department])
does not count them separately it count them together. Now if I have a
employee that has to accident it counts that correctly but I have other
employees in that department that had an accident and I need to total them
together. I hope I am making since.

--
LHEMA


"Duane Hookom" wrote:

I'm not sure what you want where at the moment. Your expression:
=nz(DLookUp("Department=1","[qry Employee Accident]"),0)
shouldn't result in anything useable. Where is this expression and what
are
you attempting to calculate. If [qry Employee Accident] has more than one
record, who knows which value it might return. Normally the first
argument
in DLookup() is not a true/false type expression.

--
Duane Hookom
MS Access MVP

"LHEMA" wrote in message
...
Good morning, Duane
They are in a report footer and the employee total does work. I think I
told
you it did not work. The dept total des not work, I have tried this
expression but it does not give me the numeric it gives me the name of
the
deparment name:
=nz(DLookUp("Department=1","[qry Employee Accident]"),0) and using this
expression it shows and error in employee total but ehn I take that
expression out employee total works
--
LHEMA


"Duane Hookom" wrote:

Did you place the new text boxes in a group or report footer section?
I
can't imagine you would want them to appear anywhere else except maybe
a
header section.
--
Duane Hookom
MS Access MVP

"LHEMA" wrote in message
...
I have added 10 more records and the expression is use for deparment:
=Count([Department]) and employee: =Count([EmployeeID]) and the
results
that i am getting is 1 for everybody
--
LHEMA


"LHEMA" wrote:

ok..I will let you know the results
--
LHEMA


"Duane Hookom" wrote:

Why don't you take the time to type in about 10-12 records to
show
us
exactly what you want in your report. This would save a whole lot
of
guessing and only take you about a minute.

--
Duane Hookom
MS Access MVP

"LHEMA" wrote in message
...
What I need to so count the number of employees that had an
accident
and
each
employee should have a separate report with the total of
accident
they
have
had. And for the department it should count only the accidents
in
that
department not a all department. I use this expression and I am
getting a
character for result what I mean is that I am getting the name
of
the
Dept
and not the numeric number
=nz(DLookUp("Department","[qry Employee Accident]"),0)
=count([employeeID])

I hope I answer your question

--
LHEMA


"Duane Hookom" wrote:

Are you attempting to count the number of employees? What
field
needs to
be
Sum()'d?

--
Duane Hookom
MS Access MVP

"LHEMA" wrote in message
...
I have been working on this for a while, I have restarted my
database it
works fine. Now I need to get total for accident per
employee
and
the
total
for accident per departments. This is what I have done thus
far, I
have
put a
footer on my report for each grouping employee total and
dept
total.
This
is
the expression that I am using =Sum([Department]) and for
employees
=Sum([EmployeeID]). Using this expression I get a mismatch
data
type.
Any
help is appreciation.
--
LHEMA