SELECT P.ClientID, P.PlanId, P.PlanName, P.Participants, P.PlanStatus,
Iif(P.DocTypeNo=1,"C",iif(P.DocTypeNo=2,"P","V")) as DocType
FROM tbl_Plans AS P;
Case 6
strField = "[DocType]"
SELECT P.ClientID, P.PlanId, P.PlanName, P.Participants, P.PlanStatus,
CStr(Iif(P.DocTypeNo=1,"C",iif(P.DocTypeNo=2,"P","V"))) as DocType
FROM tbl_Plans AS P;
I would have suggested looking at the recordset type, but you said this worked in another environment.SELECT P.ClientID, P.PlanId, P.PlanName, P.Participants, P.PlanStatus,
CStr(Choose(P.DocTypeNo,"C","P","V")) as DocType
FROM tbl_Plans AS P;
While that may work, it does suffer from the same problem as the IIF() if the number of possible values in the [DocTypeNo] field changes.