Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtering a ComboBox List (2003)

    On the startup form of the attached mdb, when the user is editing a record or is on a new record, I'd like him/her to only be able to select values in the Rich combo box for which RoomID(in the Utenti table) is equal to 9 or 12. I cannot add the condition
    Where RoomID IN(9,12)
    in the RowSource property for the Rich combo box because otherwise all the other RoomID's disappear in the Utente column.
    Attached Files Attached Files

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

    Re: Filtering a ComboBox List (2003)

    I don't think you can do that in a datasheet form. If you change it to a continuous form, you can add the condition to the row source of the combo box and place a text box on top of the combo box that displays the current username.
    It'll take a bit of work to make the continuous form look like the datasheet form.

    Alternatively, you could use the Before Update event of the combo box to cancel the update if a RoomID other than 9 or 12 is selected.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a ComboBox List (2003)

    Thank you Hans <img src=/S/smile.gif border=0 alt=smile width=15 height=15>.
    I've gone for the latter option because the user prefers the capability to drag the datasheet cells borders.

Posting Permissions

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