Dim Filter As String With e.Form.Controls("姓名") If .Value IsNot Nothing Then Filter = "姓名 = '" & .Value & "'" End If End With If Filter > "" Then Tables("表A").Filter = Filter
End If
If Tables("表A").current("姓名") = " & e.Form.Controls("姓名").text & " Then Forms("窗口1").Open End If