Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Ankeny, Iowa, USA
    Thanked 0 Times in 0 Posts

    Excel & MSQuery Parameters (Excel 2002)

    I have a msquery that downloads data from our AS400 into Excel. I'm interested in utilizing the parameters in a more complex manner if it is possible. Is it possible to have a parameter for the Criteria Operator (as opposed to having a parameter defined for the Criteria Operator "Value"). Right now I have the following in the Cirteria Operator Value (the Operator is set at "is between":
    [enter the start period],[enter the end period]
    I then connect the first parameter to cell A1, and the second parameter to cell A2. This way a general user can enter the period range with out having to go into the msquery itself. However, I'd like to know if I can change the Operator from "is between" to "equals" or "begins with" or any of the Operator options WITHOUT having to enter into the msquery itself. There are times where they may want a range of dates, or one date, or a list of dates, etc. Any ideas on how to achieve this concept would be greatly appreciated!

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Weert, Limburg, Netherlands
    Thanked 0 Times in 0 Posts

    Re: Excel & MSQuery Parameters (Excel 2002)

    The only way I know to achieve that is by modifying the SQL statement, using VBA.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    Professional Office Developers Association

Posting Permissions

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