Dim csmc1 As String = "拉板宽度"
Dim pdmc1 As String = "电压等级"
Dim pdmc2 As String = "容量"
Dim pdmc3 As String = ""
Dim pdz1 As String = "10"
Dim pdz2 As String = "399"
Dim pdz3 As String = ""
If DataTables("tb6_结构原则表").Find("参数名称 = '"& csmc1 &"' And 判断名称一 = '"& pdmc1 &"' And 判断值一 = '"& pdz1 &"' And 判断名称二 = '"& pdmc2 &"' And 判断值二 = '"& pdz2 &"' And 判断名称三 = '"& pdmc3 &"' And 判断值三 = '"& pdz3 &"'") Is Nothing Then
msgbox("没有")
Else
msgbox("有")
End If
老师,这个表里面按照上面的内容查找应该能查找到对应的行,当现在返回“没有”。如果我把“判断名称三”和“判断值三”这两列去掉查询就没有问题,问题应该是出在里面是空了,请教一下代码哪里有问题?表格中所有的列类型为字符型