You can create a form with a couple text boxes for start date and end date. You can then set the criteria in your report's record source to something like:
Between Nz(Forms!frmNewForm!txtStartDate,#01/01/1900#) AND Nz(Forms!frmNewForm!txtEndDate,#12/31/3000#)
I much prefer using code in the On Click event of a command button like:
Dim strWhere as String
strWhere = "1 = 1 "
If not IsNull(Me.txtStartDate) Then
strWhere = strWhere & " AND [datefield] >=#" & Me.txtStartDate & "# "
End If
If not IsNull(Me.txtEndDate) Then
strWhere = strWhere & " AND [datefield] <=#" & Me.txtEndDate & "# "
End If
DoCmd.OpenReport "rptYourReport", acPreview, , strWhere
Duane
MS Access MVP
Find out how to get great answers faq219-2884.