Dim Filter As String With e.Form.Controls("发货单") If .checked = True Then Filter = Filter & "发货单 = false" End If End With With e.Form.Controls("快递单号") If .checked = True Then If Filter > "" Then Filter = Filter & " And 快递单号 = '0'" Else Filter = "快递单号 = '0'" End If End If End With