Link to home
Start Free TrialLog in
Avatar of Wayne Markel
Wayne MarkelFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Helen Feddema
Helen Feddema
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Which video were you viewing? For some reason, it's not linked here.

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
Avatar of Wayne Markel

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