H
hitchhiker via AccessMonster.com
I have created a Query that grabs its data from a table and another query.
It looks like this....
SELECT POSHIST.STAFFID, qStaffData.FullName, POSHIST.PPOSITION, POSHIST.PHOME,
POSHIST.CURRENT
FROM POSHIST INNER JOIN qStaffData ON POSHIST.STAFFID = qStaffData.STAFFID
WHERE (((POSHIST.PHOME)<>0) AND ((POSHIST.CURRENT)=Yes));
My current issue is that the records show up multiple times if the person
associated with that ID has more than one position within the company or they
work at more than one location since that would be considered another
position. An example of the output looks something like this....
StaffID Fullname Pposition Phome Current
1 Smith, Bob AHC 5 -1
2 Brown, Sally AHC 6 -1
3 Jackson, Ted HC 5 -1
3 Jackson, Ted HC 6 -1
(different Phome but same StaffID, Fullname, and Poistion)
4 Anderson, Fred AHC 7 -1
What I would like to do is set the StaffID field to be unique within the
query so that Ted Jackson(3) would only show up once even though he is
employed at 2 locations. If this can not be achieved in the query then can
it be accomplished in a report?
Any help would be most appreciated.
It looks like this....
SELECT POSHIST.STAFFID, qStaffData.FullName, POSHIST.PPOSITION, POSHIST.PHOME,
POSHIST.CURRENT
FROM POSHIST INNER JOIN qStaffData ON POSHIST.STAFFID = qStaffData.STAFFID
WHERE (((POSHIST.PHOME)<>0) AND ((POSHIST.CURRENT)=Yes));
My current issue is that the records show up multiple times if the person
associated with that ID has more than one position within the company or they
work at more than one location since that would be considered another
position. An example of the output looks something like this....
StaffID Fullname Pposition Phome Current
1 Smith, Bob AHC 5 -1
2 Brown, Sally AHC 6 -1
3 Jackson, Ted HC 5 -1
3 Jackson, Ted HC 6 -1
(different Phome but same StaffID, Fullname, and Poistion)
4 Anderson, Fred AHC 7 -1
What I would like to do is set the StaffID field to be unique within the
query so that Ted Jackson(3) would only show up once even though he is
employed at 2 locations. If this can not be achieved in the query then can
it be accomplished in a report?
Any help would be most appreciated.