Dim filter As String = "1=1"
If dr("第一列") = nothing then
filter &= " and 第一列 is null"
else
filter &= " and 第一列 = '" & dr("第一列") & "'"
End If
If dr("第二列") = nothing then
filter &= " and 第二列 is null"
filter &= " and 第二列 = '" & dr("第二列") & "'"
msgbox(filter)