老师,请问我这个代码怎么修改,我这里有个查询界面 想要在姓名框里输入一个字,就可以筛选出名字中带有这个字的人 请问代码需要怎么改
此主题相关图片如下:企业微信截图_20190402122606.png

开始查询代码:
Dim Filter As String
With e.Form.Controls("计算机部门")
If .Value IsNot Nothing Then
Filter = "部门 = '" & .Value & "'"
End If
End With
With e.Form.Controls("IP地址")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "IP地址 = '" & .Value & "'"
End If
End With
With e.Form.Controls("姓名")
If .Value IsNot Nothing Then
Filter = "姓名 = '" & .Value & "'"
End If
End With
With e.Form.Controls("外网")
If .Value IsNot Nothing Then
Filter = "外网 = '" & .Value & "'"
End If
End With
Tables("主窗体_计算机查询表").Filter = Filter
If Tables("主窗体_计算机查询表").rows.count = 0 Then
MessageBox.Show("未找到该WIFI资料")
End If