Please help to solve this statement, it appear the "Too few parameters expected 1".
The problem is on the "IIf(IsNull([tblMaintWO]![Technian1]),'', DLookup('Initial', tblEmployees, 'EmpID=' & [tblMaintWO]![Technian1])) AS TechnianA " and I can't put the double quotes in the statement otherwise it show red sentence and got error.
The problem is on the "IIf(IsNull([tblMaintWO]![Technian1]),'', DLookup('Initial', tblEmployees, 'EmpID=' & [tblMaintWO]![Technian1])) AS TechnianA " and I can't put the double quotes in the statement otherwise it show red sentence and got error.
Code:
strSQL = "SELECT tblMaintWO.MWONo, tblMaintWO.TaskOpenDate, tblMaintWO.MTRStation, tblMaintWO.Task, tblMaintWO.RequestedPriority, tblMaintWO.WorkOrderStatus, tblMaintWO.Technian1, "
strSQL = strSQL & "IIf([CMFollowUp] = True, 'CM', IIf([PreventiveMaint] = True, 'PM', IIf([EIVO] = True, 'EI/VO', 'Other'))) AS TaskType, "
strSQL = strSQL & "IIf(IsNull([tblMaintWO]![Technian1]),'', DLookup('Initial', tblEmployees, 'EmpID=' & [tblMaintWO]![Technian1])) AS TechnianA "
strSQL = strSQL & "FROM tblMaintWO, tblEmployees;"