Wayne Markel
asked on
How to run a report with no criteria
Excellent video. I am a novice so don't assume I know anything.
In the example code with a Start and End date in the criteria form it doesn't appear to allow for running the report with NO start and end date. i.e. unfiltered.
Please show the code needed to do that
In the example code with a Start and End date in the criteria form it doesn't appear to allow for running the report with NO start and end date. i.e. unfiltered.
Please show the code needed to do that
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This solution goes far beyond my expectations. As a novice ACCESS developer I was looking for a verse and got the BIBLE!
Thanks,
Wayne
Thanks,
Wayne
In most cases, you just check to see if the user has entered values in your Start and End date boxes, and then move along from there. For example:
If Nz(Me.txtStart, "") = "" And Nz(Me.txtEnd, "") = "" Then
'/ user did NOT enter any dates
DoCmd.OpenReport "YourReport" etc etc
Else
'/ user did enter dates, so create the filter below
End If