cmd刷新:
If Me.cbo查询类型 = "入库" Then
If Not IsNull(Me.cbo客户名称) Then
Me.frm日常查询child.Form.Filter = "[客户名称] = '" & Me.cbo客户名称 & "'"
Me.frm日常查询child.Form.FilterOn = True
ElseIf IsNull(Me.cbo客户名称) Then
Me.frm日常查询child.Form.Filter = ""
Me.frm日常查询child.Form.FilterOn = True
End If
Me.frm日常查询child.Requery
End If
End If
你的刷新代码没有涉及日期范围的筛选
dim wh as string
wh="true"
if isnull(me.开始日期.value)=false then
wh=wh & " and 日期>=#" & me.开始日期.value & "#"
end if
if isnull(me.结束日期.value)=false then
wh=wh & " and 日期<=#" & me.结束日期.value & "#"
end if
if isnull(me.cbo客户名称.value)=false then
wh=wh & " and 公司名称 = '" & me.cbo客户名称.value & "'"
end if
Me.frm日常查询child.Form.Filter = wh
Me.frm日常查询child.Form.FilterOn = True