Dim str1 As String Dim str2 As String If Tables("银行现金汇总").current.IsNull("交易户名") = False AndAlso Tables("银行现金汇总").current.IsNull("涉及人员") = False Then '如果工号列不为空 str1 = Tables("银行现金汇总").current("交易户名") str2 = Tables("银行现金汇总").current("涉及人员") Tables("交易明细_table1").filter = "[交易户名] In (" & str1 & ") And [对方户名] In (" & str2 & ")" End If