"id <=" & str(d) & " and ((T1.日期) Between (IIf(IsNull(Forms!财务明细帐!开始日期),#1/1/2000#,Forms!财务明细帐!开始日期)) And (IIf(IsNull(Forms!财务明细帐!结束日期),#12/31/2099#,Forms!财务明细帐!结束日期)))"
Private Sub cmd查询_Click()
Dim a As String
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
a = "(日期 between #" & Me![开始日期] & "# and #" & Me![结束日期] & "#)" '这些才关键!
Me.财务明细帐子窗体.Form.Filter = a '
Me.财务明细帐子窗体.Form.FilterOn = True '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Me.财务明细帐子窗体.Requery '这句是关键
End Sub