Gasman
Enthusiastic Amateur
- Local time
- Today, 21:30
- Joined
- Sep 21, 2011
- Messages
- 16,610
No we are on the same hymn sheet.
Removing the parameter from the parameter dialog window gives
and as you can see no PARAMETER clause exists now.
I have even changed the eval statement to have an additional space
and it still does not work.
I am going to try again on Monday.
I did manage to do it with copying the querydef amending the sql with a replace and then deleting it, but this way seemed tidier?
Removing the parameter from the parameter dialog window gives
Code:
SELECT tblEmployeeDay.EmployeeID, nz(WeekdayName(Weekday([tblEmployeeDay].[DayDate],2),True),"") AS DayName, tblDates.DayDate, [tblEmployee.Forename] & " " & [tblEmployee.Surname] AS FullName, tblEmployeeDay.StartTime, tblEmployeeDay.EndTime, tblEmployeeDay.Lunch, IIf([DateType]=15 Or [DateType]=16,0,calctime([starttime],[endtime],[lunch])/60) AS Hours, tblEmployee.ReportsTo, [tblEmployee_1.Forename] & " " & [tblEmployee_1.Surname] AS Manager, tblLookup.DataValue, tblEmployeeDay.DateType, Year([tblEmployeeDay.DayDate]) & Format(DatePart("ww",[tblEmployeeDay].[DayDate]),"00") AS GroupDate
FROM tblDates INNER JOIN (((tblEmployee INNER JOIN tblEmployeeDay ON tblEmployee.EmployeeID = tblEmployeeDay.EmployeeID) INNER JOIN tblEmployee AS tblEmployee_1 ON tblEmployee.ReportsTo = tblEmployee_1.EmployeeID) INNER JOIN tblLookup ON tblEmployeeDay.DateType = tblLookup.LookupID) ON tblDates.DayID = tblEmployeeDay.DayID
WHERE (((tblEmployeeDay.EmployeeID)=[Forms]![frmEmployeeHoursRpt]![cboEmployeeID]) AND ((tblDates.DayDate) Between [Forms]![frmEmployeeHoursRpt]![txtStartDate] And [Forms]![frmEmployeeHoursRpt]![txtEndDate]) AND ((Eval([tblEmployeeDay.DateType] & [pInList]))=True))
ORDER BY tblDates.DayDate, Year([tblEmployeeDay.DayDate]) & Format(DatePart("ww",[tblEmployeeDay].[DayDate]),"00");
I have even changed the eval statement to have an additional space
Code:
Eval([tblEmployeeDay.DateType] & " " & [pInList])
I am going to try again on Monday.
I did manage to do it with copying the querydef amending the sql with a replace and then deleting it, but this way seemed tidier?

Last edited: