判断值,合成条件,如
Dim filter as string = "1=1"
If dr("维度1") = nothing Then
filter &= " and 维度1 is null"
Else
filter &= " and 维度1 = '" & dr("维度1") & "'"
End If
If dr("维度2") = nothing Then
filter &= " and 维度2 is null"
filter &= " and 维度2 = '" & dr("维度2") & "'"
msgbox(filter)