Dates, and Date ranges

  • Thread starter Thread starter RenP
  • Start date Start date
R

RenP

Hi all, I hope someone here has done this and can help me.
In my database I have three columns of dates:
1) "scheduled date" 2) "no later than date" and 3) "actual
date."
What I need to do is use dates 1 & 2 to create a range
or "window" and then have the query return dates 3) that
fall outside the range or window. Any help or suggestions
would be greatly appreciated.
 
-----Original Message-----
Hi all, I hope someone here has done this and can help me.
In my database I have three columns of dates:
1) "scheduled date" 2) "no later than date" and 3) "actual
date."
What I need to do is use dates 1 & 2 to create a range
or "window" and then have the query return dates 3) that
fall outside the range or window. Any help or suggestions
would be greatly appreciated.

.First you need to have the criteria of dates 1 and 2
filled in. One way is to put [Sched Date] in the Scheduled
Date criteria field and [No Later Than] in the No Later
Than Date criteria field. That will prompt the user for
each of the values.
Then put the following criteria in the criteria field of
the third date:
=[Scheduled Date] And <=[No Later than Date]

Be careful not to use the exact string for the criteria
field as you do for the name of the data column. For
instance if you put [Sceduled Date] in the criteria field
for the Scheduled Date column it would not work correctly.
There are other ways to do this using VBA but this is the
down and dirty simple way. If you want to know how to do
this using VBA just post a reply and ask.
 
-----Original Message-----
Hi all, I hope someone here has done this and can help me.
In my database I have three columns of dates:
1) "scheduled date" 2) "no later than date" and 3) "actual
date."
What I need to do is use dates 1 & 2 to create a range
or "window" and then have the query return dates 3) that
fall outside the range or window. Any help or suggestions
would be greatly appreciated.

.
Sorry in that last reply I realized you wanted dates that
fell outside not inside the first two dates. just change
the Greater than and Less than symbols and you will get
the results you want.
 
Ren,

In the query design grid, put this in the criteria row of the "actual
date" column...
<[scheduled date] Or >[no later than date]
 
Back
Top