View Single Post
  #13  
Old April 20th, 2006, 04:17 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default I'm stuck can not get total sum correct

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