Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Limit combo box selection in continuous form (97) (Access 97)

    I have a continuous form with 3 combo boxes which based from one table with 3 columns. How I can limit selection on second combo box based on criteria selection from first combo box and limit selection on third combo box based on previous?
    Thanks <img src=/S/catty.gif border=0 alt=catty width=19 height=18>

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Limit combo box selection in continuous form (97) (Access 97)

    The row source of the second combo needs to be a query that uses the first combo box as a parameter.
    ie. in the design grid put something like this on the criteria line:
    =forms!myform!combo1
    Do the same for the third but it gets its parameter from the second.

    One extra thing, in the after update event for combo1, you need to requery combo2 to get the list refreshed, and the same for combo2.
    Also in the oncurrent event for the form you need to requery both combos 2 and 3.
    Regards
    John



  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Limit combo box selection in continuous form (97) (Access 97)

    Each of the records in your continuous form will be treated identically, so you might want to reconsider, and just use a single form.

    Set the RowSource of Combo2 to include the value of Combo 1. Requery Combo 2 in the AfterUpdate event of combo1. Do the same setup for Combo3 and Combo2. You might want to disable Combo3 until Combo2 has been modified by the user.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

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