Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Mar 2003
    Location
    Cardiff, Wales
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box filter (2003)

    I have a user who wishes to create a form with 2 combo boxes to filter the contents of a single table, such that the first combo limits the options for the second.

    There is a restriction. Company policy does not allow us to use VBA.

    Is there a way to achieve this?

    Dave

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box filter (2003)

    You always need a bit of VBA for this, to update the second combo box when the user selects an item from the first one. There is no way to do this without any VBA at all.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Combo Box filter (2003)

    You might be able to do it by creating a Macro to requery the 2nd combo box. Of course, the query behind the 2nd combo would have to look at the first combo box.

    Beyond that, a restriction on VBA while using Access is ridiculous. If you to retrict what people can do, create a .MDE db from your existing .MDB db and distribute that; this would enable you to use code, but would not make the code available to everyone.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    New Lounger
    Join Date
    Mar 2003
    Location
    Cardiff, Wales
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box filter (2003)

    Thanks for the advice Mark

    I got it to work finally.

    I created 2 Unique value queries, 1 for each combo box. The 2nd one using the first box as a filter. I also had a 3rd query using the 2 combo box results' to filter.

    I then added a simple 'after update' event macro to requery the 2nd combo box as you suggested.

    I agree about the VBA. I'm running a helpdesk / training facility in a government office where my brief is to assist people with their work while training them to do it themselves the next time the problem occurs.

    The 'No VBA' rule is that I'm not allowed to teach staff VBA as they tend to move around departments and the IT support staff don't have the time to try to sort out the problems that will Inevitably occur where non-specialists try to write code and then leave the database to someone else.

    Users do have the option of paying a team of developers to set up their databases, but they generally won't work on other peoples. It's a touch of the 'Not Invented Here' syndrome

    Dave Russell

Posting Permissions

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