Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Between and DateAdd Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JJ - 17 Apr 2008 16:33 GMT
Hello, I've designed a database and I need help creating a query for it. In
the database, there are dates in the future when contracts expire. I need to
be able to create a query that allows me to pull the records that are either
30,60, 90, or 120 days away. For example, I want to be able to see the
records that are 0-30 days away, 31-60 days, 61-90, and 91-120. Is this
possible? Thanks
Klatuu - 17 Apr 2008 20:10 GMT
A bit more info would be useful.
Is this for a report or a form, or what?
Do you want to return one recorset with just a specific date range, or do
you want to return something that shows which data range the record is in?
From where are you running the query?
What version of Access?
Signature

Dave Hargis, Microsoft Access MVP

> Hello, I've designed a database and I need help creating a query for it. In
> the database, there are dates in the future when contracts expire. I need to
> be able to create a query that allows me to pull the records that are either
> 30,60, 90, or 120 days away. For example, I want to be able to see the
> records that are 0-30 days away, 31-60 days, 61-90, and 91-120. Is this
> possible? Thanks
Ron2006 - 17 Apr 2008 21:28 GMT
The other question is "Away from what?"
Klatuu - 17 Apr 2008 21:42 GMT
Good observation.
I, without thinking too deeply, assumed Date()
But then I am sure you know about Assume <g>
Signature

Dave Hargis, Microsoft Access MVP

> The other question is "Away from what?"
JJ - 18 Apr 2008 14:47 GMT
Thanks for all the suggestions but I got it working. I just used this formula
and changed the days as I needed

Between DateAdd("d",+31,Date()) And DateAdd("d",+60,Date())

That would give me dates from 31-60. And I just worked around this. Thanks.

> Good observation.
> I, without thinking too deeply, assumed Date()
> But then I am sure you know about Assume <g>
>
> > The other question is "Away from what?"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.