Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2009
    Location
    PA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm trying to create a query that would allow user to view records from the prior 6 months based on a date they key. I tried using the DateDiff and Date Part functions to set the criteria but I'm getting invalid data. My current criteria in the query is as follows:

    Between [Enter Ending Date] And (DateDiff("m",-1,[Date Closed]))


    Enter Ending Date = the date the user keys
    Date Closed = The date from the report

    So in conclusion, I'm trying to have the user pull a range of records 6 months prior to the [Enter Ending Date] value.

    Any help is appreciated.Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If I understand your description correctly, the field Date Closed should be within the six months preceding the date entered by the user.
    If so, you should enter the following condition in the Criteria row for the Date Closed column:

    Between DateAdd("m",-6,[Enter Ending Date]) And [Enter Ending Date]

    If not, could you try to explain again what you want?

Posting Permissions

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