A family of Microsoft relational database management systems designed for ease of use.
Hi @Robbie Doo
Access sometimes still evaluates the inner expression too early. This version forces Access to short‑circuit:
=IIf([rpt01_TestCount].[Report].[HasData]=True And [PU_Loc]=1 And [Trvl_Type]=1,
[rpt01_TestCount].[Report].[Text0],
0)
But if this still errors, use the nested version above — it is the most stable.
Use nested iif
=IIf([rpt01_TestCount].[Report].[HasData],
IIf([PU_Loc]=1 And [Trvl_Type]=1,
[rpt01_TestCount].[Report].[Text0],
0),
0)
Access evaluates expressions left to right. With the nested version:
If the subreport has no data, Access returns 0 immediately
It never tries to evaluate [Text0] or the other conditions
- No error
Thanks.