Dim cx As WinForm.TextBox = e.Form.Controls("查询TextBox")
Dim flt As String
If cx.value="" Then
MessageBox.show("查询值不能为空!")
Else
For Each c As DataCol In DataTables("人员信息").dataCols
If c.IsString AndAlso c.name<>"在职状态" Then
flt = c.Name & " like '*" & cx.text & "*' or " & flt
End If
Next
flt=flt & "r"
flt = flt.Replace("or r"," and 在职状态<>'离职'")
Tables("人员信息").Filter = flt
End If
我是希望多字段模糊查询,但是不包括已经离职的。这个代码哪里有问题。