G
Guest
I'm trying to list all the MIS request calls submitted by either regular
employees (those with employee id) or consultants to be use in an email body
text. I tried converting the 'if' logic below to get the user who placed the
request as one of the select field in the sql text using 'case' statement
(see SQLAssigned_Text) but am getting an error. If I take out the case
statement, it runs fine. Employee_Id is a text field. What is the problem?
TIA.
Iif([Employee_Id]>"0",[User_Name], [Consultant_Name] as [User_Name]
SQLAssigned_Text = "Select Str(CALL_USERS!Call_Id) AS Call_Id,
Call_Category.Call_Desc," _
&" (CASE WHEN Employee_Id > '0' THEN Employee_Name ELSE Consultant_Name
END) AS USER_NAME" _
& " FROM Call_Category INNER JOIN ......
employees (those with employee id) or consultants to be use in an email body
text. I tried converting the 'if' logic below to get the user who placed the
request as one of the select field in the sql text using 'case' statement
(see SQLAssigned_Text) but am getting an error. If I take out the case
statement, it runs fine. Employee_Id is a text field. What is the problem?
TIA.
Iif([Employee_Id]>"0",[User_Name], [Consultant_Name] as [User_Name]
SQLAssigned_Text = "Select Str(CALL_USERS!Call_Id) AS Call_Id,
Call_Category.Call_Desc," _
&" (CASE WHEN Employee_Id > '0' THEN Employee_Name ELSE Consultant_Name
END) AS USER_NAME" _
& " FROM Call_Category INNER JOIN ......