Dim xm As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("姓名")
Dim zc As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("职称")
Dim jb As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("级别")
Dim bm As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("部门")
Dim xb As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("性别")
Dim sf As RibbonMenu.TextBox = RibbonTabs("日常工作").Groups("日常工作").Items("身份")
Dim Filter As String
With xm.Text
If xm.Text > "" Then
Filter = "姓名 = '" & xm.Text & "'"
End If
End With
With zc.Text
If zc.Text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "技术职务 = '" & zc.Text & "'"
End If
End With
With jb.Text
If jb.Text Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "级别 = '" & jb.Text & "'"
End If
End With
With bm.Text
If bm.Text > "" Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "部门 = '" & bm.Text & "'"
End If
End With
With xb.Text
If xb.Text >"" Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "性别 ='" & xb.Text & "'"
End If
End With
With sf.Text
If sf.Text >"" Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "身份 ='" & sf.Text & "'"
End If
End With
If Filter > "" Then
Tables("人事信息主表").Filter = Filter
End If
帮看看问题出在哪里,执行提示 从字符串“”到类型“Boolean”的转换无效。