你漏掉一行吧:
Dim Filter As StringWith e.Form.Controls("commudi") If .value IsNot Nothing Then Filter="目的地 = '" & .Value & "'" End IfEnd WithTables("xxx").Filter = filter