Share via

Date Query

Anonymous
2010-10-08T16:37:23+00:00

I would like to set the parameters in my query for  a date performed greater that today's date + 30 days.  I tried this but it didn't work. <Date()+30

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2010-10-08T17:20:06+00:00

     I would like to set the parameters in my query for  a date performed greater that today's date + 30 days.  I tried this but it didn't work. <Date()+30

    The criteria you show will return all dates less than 30 days from today's date. So it would be anything less that Nov 7th. If you wnat greater than Nov 7th you use:

    >DateAdd("d",30,Date())

    If you want greater than a month from today use:

    >DateAdd("m",1,Date())

    Use >= if you to include the date 30 days hence.


    Hope this helps, Scott<> P.S. Please post a response to let us know whether our answer helped or not. Microsoft Access MVP 2009 Author: Microsoft Office Access 2007 VBA Technical Editor for: Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports and Queries

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-10-08T16:56:16+00:00

    Or do you mean 'after today, but no later than 30 days after today'?  If so:

    WHERE [YourDateField] > DATE()

    AND [YourDateField] < DATEADD("d",31,DATE())


    Ken Sheridan, Stafford, England

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-10-08T16:46:04+00:00

    Are you looking for dates that are beyond or same as today plus 30?

    >=Date()+30

    Are you looking for dates that are before or same astoday plus 30?

    <=Date()+30


    Build a little, test a little.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-10-08T16:41:39+00:00

    FraserRiverView wrote:

    I would like to set the parameters in my query for a date performed

    greater that today's date + 30 days. I tried this but it didn't work.

    <Date()+30

    If you mean "greater than today's date + 30":

    Date()+30

    -- cu

    Karl

    *******

    Access-FAQ (German/Italian): http://www.donkarl.com

    Was this answer helpful?

    0 comments No comments