If Not IsNull(Me.开始日期) Then
stw = stw & "[日期] >= #" & Me.开始日期 & "# and "
End If
If Not IsNull(Me.结束日期) Then
stw = stw & "[日期] <= #" & Me.结束日期 & "# and "
End If
If Len(stw) > 0 Then
stw = Left(stw, Len(stw) - 5)
End If
Me.窗体1子窗体.Form.FilterOn = True
Me.窗体1子窗体.Form.Filter = stw
If Not IsNull(Me.开始日期) Then
strWhere = strWhere & "([日期] >= " & Format(开始日期, "00000000") & ") AND "
End If
If Not IsNull(Me.结束日期) Then
strWhere = strWhere & "([日期] <= " & Format(结束日期, "00000000") & ") AND "
End If
If Len(strWhere) > 0 Then
strWhere = Left(strWhere, Len(strWhere) - 5)
End If
Me.窗体1子窗体.Form.Filter = strWhere
Me.窗体1子窗体.Form.FilterOn = True