Lagerca
Feb 13 2007, 11:11 AM
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.
freakazeud
Feb 13 2007, 11:18 AM
Hi,
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.:
BETWEEN DateAdd("yyyy",-1,Date()) AND Date()
?
HTH
Good luck
Lagerca
Feb 13 2007, 02:06 PM
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....
Lagerca
Feb 13 2007, 02:20 PM
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()
ScottGem
Feb 13 2007, 02:40 PM
Easier would be:
>Date()-1
Lagerca
Feb 14 2007, 12:46 PM
Thank you Scott for the short-cut! Have a pleasant day!
ScottGem
Feb 14 2007, 01:19 PM
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.