oxicottin
Learning by pecking away....
- Local time
 - Today, 04:43
 
- Joined
 - Jun 26, 2007
 
- Messages
 - 891
 
Hello, I have a query that I need to add one more criteria to and I cant get it to work. I have it look at [Forms]![frm_YearCalendar]![cboYear] for the year but I also need to only look up to todays date. I tried adding <Date() but it didint work or I must be inserting it incorectly. Thanks!
	
	
	
		
 
		Code:
	
	
	SELECT tbl_YearCalendar.EmployeeID, Sum(Nz([AbsenceTime],0)) AS SumOfVacationUsed
FROM tbluAbsenceCodes INNER JOIN tbl_YearCalendar ON tbluAbsenceCodes.AbsenceID = tbl_YearCalendar.AbsenceID
WHERE (((DatePart("yyyy",[AbsenceDate]))=([Forms]![frm_YearCalendar]![cboYear])) AND ((tbluAbsenceCodes.AbsenceCode)="V" Or (tbluAbsenceCodes.AbsenceCode)="VFML"))
GROUP BY tbl_YearCalendar.EmployeeID;