我做了个变量解决问题了 Dim strsql As String strsql = "" If Trim(Text1.Text) <> "" Then strsql = "(FrName like '%" & Trim(Text1.Text) & "%')" End If If Trim(Combo1.Text) <> "" Then If strsql <> "" Then strsql = strsql & " and (TypeName like '%" & Trim(Combo1.Text) & "%')" Else strsql = "(TypeName like '%" & Trim(Combo1.Text) & "%')" End If End If