I am assuming that you are using a form to launch a report, and that the user can select a range of start and end dates from two combo boxes that look to the actual data and show only actual dates in the data (use the combo box wizard). Then you have a button to launch the report. This code goes on the on click event of that button. If you use the wizard to launch the report, you will get this code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptYourReportName"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
You paste in the code to replace stLinkCriteria, and change stLinkCriteria in the DoCmd line to sLink. Make sure to refer to the combo boxes by their proper names, etc. I used sample names.
Did that help?
mmcdonal
|