按钮的代码改为:
Dim t As WinForm.TextBox = e.Form.Controls("t")If t.Value IsNot Nothing Then Tables("基本表").Filter = "单据号 = '" & t.Value & "'"End If