Select Case e.DataCol.Name Case "主诉" Dim filter As String = "1=2" For i As Integer =1 To DataTables("表B").DataCols.Count-1 Dim str As String = e.DataRow("主诉") Dim name As String = Tables("表B").Cols(i).name If str> "" AndAlso str.Contains(name) Then filter &= " or " & name & " Is not null" '在表B中筛选出【发热】列不为空的行 End If Next Tables("表B").filter = filter End Select