Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Form (2000)

    (While anyone can help me with this, Hans, you offered me a solution a couple of months ago- I should have taken it!)

    I would like to develop a form that captures criteria from the user to be used to run a query (that would either be displayed in a bound subform or in a new form- doesn't matter).

    For example, the user selects firm size (combo/list box), age of firm (combo/list box), and three other Yes/No check boxes. Upon completing this selection process, (perhaps an "update" control button is clicked) a query is generated based on these criteria and ran, with the results displayed in the subform or in a new form.

    (I know how to control a form from one combo/list box, but I can't extrapolate this knowledge to a multi-field query.)

    Any example will help.

    Thanks,

    Brandon.

  2. #2
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Form (2000)

    The secret lies not in the design of the form, but the design of the query. If you're designing the query in design view, you can set the values in the Criteria row to the values of the fields on your form, like this:

    [Forms]![MyFormName]![FirmSizeComboBox]

    As long as the query runs while the form is open, it should work. If the form isn't open, the user will be prompted to enter the parameter values for each of the criteria.
    Waggers
    If at first you do succeed, you've probably missed something.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Query Form (2000)

    If you have access to the Northwind Sample Database, have a look at the Sales by Year Query and the Sales by Year Dialog Form. It will give you a workable example of how to take advantage of this feature!
    Regards,
    Rudi

  4. #4
    Lounger
    Join Date
    Jan 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Form (2000)

    Dave and Rudi,

    Thanks to both of you for your help (I would like to think that I can get it from here, but you never know!)

    Brandon.

Posting Permissions

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