If IsNull(Me.文本18) And IsNull(Me.文本21) Then
MsgBox "请输入要查询的产品编号或产品名称!"
Else
strSQL = "select * from CK_入库明细表 where ([产品编号] like '*" & Me.文本21 & "*') and ([产品名称] like '*" & Me.文本18 & "*');"
Me.ZY.Form.RecordSource = strSQL
Text7.Value = Nz(DSum("数量", "CK_入库明细表", Me.ZY.Form.Filter))
End If