Full Version: Display Current and Future Dates Criteria
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
I have a date field [DateOfAppt] in my query that I want to display only the current and future dates. In the Criteria I have tried: >DateAdd("yyyy",-1,Date()) which lists all the dates including past dates and future dates; and I have tried: >Now() and >=Now() which does not include today’s current date; it does include all future dates. I am wondering if someone could suggest what would be the correct Criteria to include only the current date and all future dates! Thanks in advance.
How can there be future dates? Are you entering future dates? What are you exactly trying to do? Have a time frame from a past date up to today e.g.:
ETWEEN DateAdd("yyyy",-1,Date()) AND Date()
Good luck
Thanks for your response. The dates are future appointment dates in a scheduling program (db) that are needed for my staff member. I placed the above formula in the Criteria and what is displayed are: today's date and the previous dates. Yesterday has already gone by so the previous day's appointment are of no concern. However, today's appointments and all the future appointment dates are needed! Thanks....
I found that changing the minus to a positive, the dates: Current date and future dates are displayed as I was looking for! Thanks HTH.....
BETWEEN DateAdd("yyyy",+1,Date()) AND Date()
Easier would be:
Thank you Scott for the short-cut! Have a pleasant day!
glad to assist
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.