Let's assume we have :
- a recordset (rs) from a query returning no records
- a wrkField containing "A"
The following statement
works correctly, wrkTarget = "NO" in the example
The statement
gives an error "No Current record" dispite the fact it should never get to rs.[Field]
Does someone knows what's happening and how to bypass (I know IF ... THEN ... ELSE, but want to keep going with IIF)
Thanks
- a recordset (rs) from a query returning no records
- a wrkField containing "A"
The following statement
Code:
wrkTarget = iif(rs.EOF, "NO", rs.[Field])
The statement
Code:
wrkTarget = iif(rs.EOF, "NO", iif(wrkField = "A", "YES", rs.[Field]))
Does someone knows what's happening and how to bypass (I know IF ... THEN ... ELSE, but want to keep going with IIF)
Thanks
Comment