Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Date + 60 (2003)

    I have a query that I use to send a rpt out to vendors, currently I am sending them everything that is active (controled by check box), I am wanting to know how to only send out from today's date plus 60 days. I need to do this because things may change before we get to 60 days out.

    thanks,
    jackal

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Date + 60 (2003)

    In the criteria for the relevant date field (in the query that acts as record source of the report), put

    >=Date()+60

    or

    >Date()+60

    depending on whether you want to include the date 60 days from today or not.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Date + 60 (2003)

    When I enter either of your suggestions I get the following:

    Compile error. in query expression '(((tblJobs.PaveDate)>Date()+60) AND ((tblCrew.CrewNum)=150) AND ((tblJobs.CompletedJobs)=No) AND ((tblJobs.RMSupplier) Is Null))'.

    I am putting this criteria on a date field that is entered, does this matter?
    thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Date + 60 (2003)

    Sorry, no idea. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date + 60 (2003)

    The wording on the original post was a bit confusing, but I think the poster wants to use "<" or "<=".
    Legare Coleman

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Date + 60 (2003)

    You could be right, but that doesn't explain the "compile error".

  7. #7
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date + 60 (2003)

    ReportDate=Cstr(Date) 'can be system date or any starting date you choose

    ReportStartDate = DateSerial(Year(ReportDate), Month(ReportDate) , Day(ReportDate)+60) ' 20050201

    If you read up on DateSerial function it may explain better.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •