hi . i have the following sql in my query
SELECT TbMain.CountryID, TbMain.StateID, TbMain.KindID
, Avg(IIf([TBMain.Time]=Form
s!FSalesSt
ock!Report
DateStart,
Price/Area
)) AS [M2 Start]
, Avg(IIf([TBMain.Time]=Form
s!FSalesSt
ock!Report
DateEnd,Pr
ice/Area))
AS [M2 End]
, [M2 Start ]-[M2 End ] AS [M2 Difference]
FROM TbMain
WHERE ((([TBMain.Time])=[Forms]!
[FSalesSto
ck]![Repor
tDateStart
] Or ([TBMain.Time])=[Forms]![F
SalesStock
]![ReportD
ateEnd]))
GROUP BY TbMain.CountryID, TbMain.StateID, TbMain.KindID;
the sql is working fine, however both [M2 Start] and [M2 End] can have a null value, so what i want if either [M2 Start] and [M2 End] have a null value it shows " No data'
And for [M2 Difference] if one of the values is null it will show "No Change"
Start Free Trial