How to fix: Data type mismatch criteria expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings
I'd like to count\sum a list of records seperately for different
individuals. For example, I have a table that contains different statuses
for these individuals, such as Other, Vacation, Personal Holiday, Training
and Sick. The problem is each status is listed under one (1) field "Absent
Type". How can I run a report that will seperate them.
i.e. John Doe Other 0, Vacation 10, Personal Holiday 1, Training 2 and Sick
20.
I have tried to run the query with Absent Type Group By and Absent Type Sum,
when I run it this way, I get the imfamous Data type mismatch criteria
expression message.
 
Something along the lines of:

Select EmpID, EmpName, AbsentType, Count(AbsentType) from tblEmployee
INNER JOIN tblEmployeeAbsent ON Empid = EmpID
Group By EmpID, AbsentTypeID

You can also crosstab it to, to get a more horizontal layout.

--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234
(e-mail address removed)
www.fmsinc.com/consulting
 
Hey Karl
Thanks a million. I am about try this shortly.
I do appreciate your quick response.

Martin
 
SClark
Cool. I really appreciate the SQL lines, they will be a huge help!
Thanks again and I appreciate your quick response.

Martin
 
Back
Top