Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2002
    Posts
    23

    Unanswered: query report from date

    Hi,

    I have trouble figuring out how to get all record when user input a date on a date field within one year of the date but only for those that is one year before the inputted date. Example. user inputted 02/02/2003, the query should gives me all record that is before 02/02/2003 within a year from 02/02/2002 to 02/02/2003. I try several method and its giving error message. Any help is much appriciated. Thanks.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What methods have you tried, and what error messages did you receive?

    One of many solutions would be to give the user a small form with a text box to enter the date into. You could then construct the entire where clause dynamically in the onopen event of your report. Naturally this is one of many methods.

  3. #3
    Join Date
    Mar 2002
    Posts
    23
    Thanks for the reply. I don't think the method I used really work, cause I use a parameter something like this on the query: >=([input_date]-365) and <=[input_date].. I only need the information in a query. What do you suggest.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    between startDate and endDate

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    oh, and use
    between dateadd("y", -1, endDate) and endDate

    izy
    currently using SS 2008R2

Posting Permissions

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