jleval
Registered User.
- Local time
- Today, 12:44
- Joined
- May 16, 2012
- Messages
- 53
Okay, I did the following, but the problem occurs if there is no such date range. My report seems to have an error that says there is no such value to evaluate.
Is there a way to catch this error and have a message box explain that there is no such date?
Is there a way to catch this error and have a message box explain that there is no such date?
Just add two controls to capture the start and end dates to the form and then you can filter the report in the click event on the command button to:
Code:Dim strWHERE As String strWHERE = "[DateFieldNameHere] Between #" & Me.txtStartDate & "# AND #" & Me.txtEndDate & "#" DoCmd.OpenReport "ReportNameHere", acViewPreview, , strWHERE