Solved

Between Date and Year End

Posted on 2014-11-14
5
219 Views
Last Modified: 2014-11-14
Experts,

I need a formula that returns data between the current date and the year end.

I have the following and I need to modify it as so.
Between Date() And Date()+Nz([Enter Number of Days in Future],100000) Or Is Null

thank you
0
Comment
Question by:pdvsa
  • 2
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40442915
I prefer the following syntax:

>= Date() AND < DateSerial(Year(date()) + 1, 1, 1)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40442926
Not knowing whether the field you are trying to filter on contains only date data, if you use the BETWEEN syntax, and use DateSerial(Year(Date()) + 1, 1, 1) then you would also retrieve data for Jan 1, 2015.  By using the < you are certain to get only data pertaining to 2014.
0
 

Author Comment

by:pdvsa
ID: 40443024
Dale, thanks.  I think I need to include days that are 5 days after year end.  I think I would need Between and that DateSerial if I am thinking correctly.  Not sure exactly what I need to change for 5 days after year end.  Could you help me with that?
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40443197
That would be:

Between Date() And DateSerial(Year(Date()) + 1, 1, 5)

/gustav
0
 

Author Closing Comment

by:pdvsa
ID: 40443596
Perfect.  Thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now