Dim Filter As StringWith e.Form.Controls("TB1") If .Value IsNot Nothing Then Filter = "订单号 = '" & .Value & "'" End IfEnd WithIf Filter > "" Then Tables("窗口1_Table1").Filter = FilterEnd If