Results 1 to 7 of 7

Thread: Parameter Query

  1. #1
    Join Date
    May 2007
    Posts
    12

    Question Unanswered: Parameter Query

    I need to create a parameter query and have run into a problem. Here is the set up. I have an ODBC connection to a helpdesk database. I need to run a query that prompts for the input of two fields, start_date and close_date. To summarize, I need to run a report for tickets opened and closed between 5/1/07 and 5/29/07 (opened and closed being two different fields). The date fields in the origin database is a time date field, so I have used an expression to "crop" the time portion off of both fields. But I can figure out how to run a parameter query to ask for dates between two fields. Can anyone help?

  2. #2
    Join Date
    Jul 2006
    Location
    Tucson, Arizona
    Posts
    19
    Criteria: Between [Type the beginning date] And [Type the ending date]

  3. #3
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by blondeveloper
    Criteria: Between [Type the beginning date] And [Type the ending date]

    make sure that when you do this, you put the ' # ' sign infront and behind the dates. it should read like this :

    #05/01/2007# & #05/30/2007#

  4. #4
    Join Date
    May 2007
    Posts
    12
    That won't work because the start date is a different field from the close date. Thanks for trying though.

  5. #5
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    are you trying to pull records where open date is between date1 and date2 AND close date is between date1 and date2

    or

    open date = date1 and close date = date2

    or something else

  6. #6
    Join Date
    May 2007
    Posts
    12
    Rogue, It would be the second one. All records opened = date 1 and closed = date 2. Any suggestions.

  7. #7
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    sounds like the problem is the date conversion

    try using format(oracle_date_field,"mm/dd/yyy") or whatever the format of the user input date field is

    if your having an issue with the applying the criteria....

    in the query grid use the above format on the open date, in the criteria line put [enter open date]

    do the same for close date using [enter close date] in the criteria (make sure your criteria are on the same line and define the data type for your parameters)

Posting Permissions

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