UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Display Current and Future Dates Criteria    
 
   
Lagerca
post Feb 13 2007, 11:11 AM
Post #1

UtterAccess Addict
Posts: 229



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.
Go to the top of the page
 
+
freakazeud
post Feb 13 2007, 11:18 AM
Post #2

UtterAccess VIP
Posts: 31,413
From: NC, USA



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
Go to the top of the page
 
+
Lagerca
post Feb 13 2007, 02:06 PM
Post #3

UtterAccess Addict
Posts: 229



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....
Go to the top of the page
 
+
Lagerca
post Feb 13 2007, 02:20 PM
Post #4

UtterAccess Addict
Posts: 229



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()
Go to the top of the page
 
+
ScottGem
post Feb 13 2007, 02:40 PM
Post #5

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



Easier would be:

>Date()-1
Go to the top of the page
 
+
Lagerca
post Feb 14 2007, 12:46 PM
Post #6

UtterAccess Addict
Posts: 229



Thank you Scott for the short-cut! Have a pleasant day!
Go to the top of the page
 
+
ScottGem
post Feb 14 2007, 01:19 PM
Post #7

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



glad to assist
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 07:29 PM