我想说If the field "Resource" holds a value" ... then
基本上与
IIF(IsNothing(Fields!Resource.Value)
答案 0 :(得分:10)
只需添加NOT
:
If Not IsNothing(something) Then ...
编辑:
刚刚看过vba标记,
Dim myVariable as Object
If Not myVariable Is Nothing Then ...
答案 1 :(得分:2)
检查值的一种非常有效的方法是检查它的长度:
如果Len(Fields!Resource.Value)<> 0
答案 2 :(得分:2)
VBA中不存在IsNothing()。要检查字段或变体是否包含某些内容,您应该使用
If myField Is NUll then
要检查未分配的对象,请使用
If myObject Is Nothing Then