Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo boxes on Combo boxes (2000)

    I am designing a club membership database. A member's subform contains the club type that the person belongs to along with membership types relevant to each club type. Both these fields are combo boxes.

    I select a club type and hey presto, when I click on the membership types combo, only the memberships appropriate to the club type I selected are displayed. Great.

    Problem is when the person belongs to two club types. In the second row of my subform, I select another club type and bingo, the membership type to row one disappears because that membership type applies to a different club type.

    In other words, as soon as I select a club type, all membership types that apply to other club types disappear.

    How can I keep them displayed?

    Thanks for you help.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo boxes on Combo boxes (2000)

    You could leave all the memberships of all the clubs in the second combo.
    In the Before Update of the second combo, do a test to see if the selected membership belongs to the selected club. If not display a message box asking to select another membership. To facilitate the entering, add a second column to the second combo with the club name.

    A second manner would be to add a textbox with the membership, and use the second combo only to enter the membership info. The membership table would be linked in the query of the subform.

    A third manner would be to combine the two entries in one combo with two columns and in the after update of the combo set the membership field equal to the membership column of the combo
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo boxes on Combo boxes (2000)

    The way I usually handle this is with a texbox on top of the combobox. Make the textbox a tab stop, but not the combobox. Lock the textbox. Either bind both controls to the same field or use an unbound combobox with code to populate the textbox. You use the combobox to populate the field, while the textbox simply displays the value. That way, when you change the combobox list, the values won't disappear. Just remember, that if you actually select the combobox in the current record, it will float to the top on all the subform records because there is really only one combobox on the subform.
    Charlotte

Posting Permissions

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