Can someone tell me what the IIF statement at the end of the select statement does?
SELECT [New Table].[TGT ETA (S/S)], [New Table].[Style Number], [New Table].Color, [New Table].Country, [New Table]![I70DOMINT] AS [DOM/INT], [New Table].Factory, [New Table].[Style Description], [New Table]![PSizes] AS [Photo sizes], [New Table].[Photo Qty], [New Table].[Date Photo due\TGT X-Date], [New Table].[Date Photo sent], [New Table].[Photo ETA], [New Table].[Date Photo rec'd], [New Table].Quantity, [New Table].[Number of Photo Rec'd], [New Table].[Expected Lot Completion Date S/S TGT X-Date], [New Table].[Actual Date Sent S/S], [New Table].[HAWB#], [WHP0110 Summary].[Max Of KRHDRC], [New Table].[Rec'd @ Office], [New Table]![Sizes] AS Sizes, [New Table].[Quantity Rec'd], [New Table]![I71CUT#] AS [PO/Cut#], [New Table].[Design Approved?], [WHP0110 Summary].[Max Of KRHDPS], [New Table].[Quantity Complete?], [New Table].Season, [New Table].Comments, IIf((IsNull([Max Of KRHDPS])),[TGT ETA (S/S)],[Max Of KRHDPS]) AS [Photo ETA1]
FROM [New Table] LEFT JOIN [WHP0110 Summary] ON ([New Table].[I71CUT#] = [WHP0110 Summary].KRHCUT) AND ([New Table].Season = [WHP0110 Summary].WHSEAYR)
WHERE ((([New Table].Season)=[Enter Season]))
ORDER BY [New Table].[TGT ETA (S/S)], [New Table].[Style Number];
SELECT [New Table].[TGT ETA (S/S)], [New Table].[Style Number], [New Table].Color, [New Table].Country, [New Table]![I70DOMINT] AS [DOM/INT], [New Table].Factory, [New Table].[Style Description], [New Table]![PSizes] AS [Photo sizes], [New Table].[Photo Qty], [New Table].[Date Photo due\TGT X-Date], [New Table].[Date Photo sent], [New Table].[Photo ETA], [New Table].[Date Photo rec'd], [New Table].Quantity, [New Table].[Number of Photo Rec'd], [New Table].[Expected Lot Completion Date S/S TGT X-Date], [New Table].[Actual Date Sent S/S], [New Table].[HAWB#], [WHP0110 Summary].[Max Of KRHDRC], [New Table].[Rec'd @ Office], [New Table]![Sizes] AS Sizes, [New Table].[Quantity Rec'd], [New Table]![I71CUT#] AS [PO/Cut#], [New Table].[Design Approved?], [WHP0110 Summary].[Max Of KRHDPS], [New Table].[Quantity Complete?], [New Table].Season, [New Table].Comments, IIf((IsNull([Max Of KRHDPS])),[TGT ETA (S/S)],[Max Of KRHDPS]) AS [Photo ETA1]
FROM [New Table] LEFT JOIN [WHP0110 Summary] ON ([New Table].[I71CUT#] = [WHP0110 Summary].KRHCUT) AND ([New Table].Season = [WHP0110 Summary].WHSEAYR)
WHERE ((([New Table].Season)=[Enter Season]))
ORDER BY [New Table].[TGT ETA (S/S)], [New Table].[Style Number];