Hi I have the following expression. I'm trying to say "if the second field Is Not Null". Can you help.
Thanks
=Iif((Fields!approved.Value = "N" & Fields!W_O_Count.Value IsNotNull), "Red", "Transparent")
ISNULL in VBA is a logical function which is used to determine whether a given reference is empty or NULL or not that is why the name ISNULL, this is an inbuilt function which gives us true or false as a result, based on the result we can arrive to conclusions, if the reference is empty it returns true value else false ...
The ISEMPTY function returns TRUE if the value is a blank cell or uninitialized variable. The ISEMPTY function returns FALSE if the value is a cell or variable that contains a value (ie: is not empty).
The Null value indicates that the Variant contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It's also not the same as a zero-length string (""), which is sometimes referred to as a null string.
VBA IsEmpty is a logical function that tests whether selected is empty or not. Since it is a logical function it will return the results in Boolean values i.e. either TRUE or FALSE. If the selected cell is empty it will return TRUE or else it will return FALSE.
Use Not IsNull(Fields!W_O_Count.Value)
So:
=IIF(Fields!approved.Value = "N" & Not IsNull(Fields!W_O_Count.Value)), "Red", "Transparent")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With