I have a field named action and there are sometimes actions with the same name, but different indexes. I would like to add the words "Start Time" to actions that have an index between 200 and 300. I tried something like this --- IIf(PlanAndActPointUNION.Action between 200 AND 300, PlanAndActPointUNION.Action & "Start Time", PlanAndActPointUNION.Action) --- but it didn't work. Any suggestions? Here is the actual query I'm using.
Code:
SELECT PlanAndActPointsUNION.UserID, PlanAndActPointsUNION.WeekNumber, PlanAndActPointsUNION.Index, PlanAndActPointsUNION.Action, ((PlanAndActPointsUNION.[PlannedMon])+(PlanAndActPointsUNION.[PlannedTue])+(PlanAndActPointsUNION.[PlannedWed])+(PlanAndActPointsUNION.[PlannedThu])+(PlanAndActPointsUNION.[PlannedFri])+(PlanAndActPointsUNION.[PlannedSat])+(PlanAndActPointsUNION.[PlannedSun])) AS Planned, ((PlanAndActPointsUNION.[ActualMon])+(PlanAndActPointsUNION.[ActualTue])+(PlanAndActPointsUNION.[ActualWed])+(PlanAndActPointsUNION.[ActualThu])+(PlanAndActPointsUNION.[ActualFri])+(PlanAndActPointsUNION.[ActualSat])+(PlanAndActPointsUNION.[ActualSun])) AS Actual
FROM PlanAndActPointsUNION
WHERE (((PlanAndActPointsUNION.UserID)=2) AND ((PlanAndActPointsUNION.WeekNumber)<13) AND (((([PlanAndActPointsUNION].[PlannedMon])+([PlanAndActPointsUNION].[PlannedTue])+([PlanAndActPointsUNION].[PlannedWed])+([PlanAndActPointsUNION].[PlannedThu])+([PlanAndActPointsUNION].[PlannedFri])+([PlanAndActPointsUNION].[PlannedSat])+([PlanAndActPointsUNION].[PlannedSun])))>0))
ORDER BY PlanAndActPointsUNION.UserID, PlanAndActPointsUNION.Index, PlanAndActPointsUNION.WeekNumber;