Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter & Calculate sums

Status
Not open for further replies.

jkbear

Programmer
Nov 25, 2009
2
US
I have a table which lists employment history of job applicants. It has fields for "Name," "Position," "StartDate," and "EndDate." This information is displayed in an applicant form, sorted by "Name." Each applicant may have multiple positions and multiple instances of the same position. How do I display a summary of the positions showing how many years experience the applicant has in each position listed.
 
Code:
SELECT 
 tblEmployment.Name, 
 tblEmployment.position, 
 Sum(Round(DateDiff("m",[tblEmployment]![startDate],[tblEmployment]![endDate])/12,1)) AS TimeInPos
FROM 
 tblEmployment
GROUP BY 
 tblEmployment.Name, 
 tblEmployment.position;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top