Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Location
    The Hague, Netherlands
    Posts
    95

    Unanswered: Set Combobox to unselected

    Hi,

    I have 3 dropdown-boxes which the user can select. It doesnt matter which one, on the right side the right info will appear.

    However, if the user selects a criterium from one combobox, I want those other two to be 'resetted' to blank/unselected, so it will always be very clear on which combobox the 'search-results' on the right are based.

    Is there an easy way to do this? Some sort of set combobox.value to blank or smt?

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    You can use a command such as:

    Me("My Combo Box 1").Value = IIf(Len(Me("My Combo Box 2").Value, vbNullString, Me("My Combo Box 1").Value)

    This will reset the combo box to display nothing. Place the code in the AfterUpdate event of each combo box
    Regards
    Justin

  3. #3
    Join Date
    Feb 2005
    Location
    The Hague, Netherlands
    Posts
    95
    Quote Originally Posted by justin_tighe
    You can use a command such as:

    Me("My Combo Box 1").Value = IIf(Len(Me("My Combo Box 2").Value, vbNullString, Me("My Combo Box 1").Value)

    This will reset the combo box to display nothing. Place the code in the AfterUpdate event of each combo box
    Regards
    Justin
    thx, but this is not exactly what I asked..
    I think the answer to my question is Combobox1.value = vbnullstring, I'll test it now

    -- Edit
    It works perfectly, thanks

Posting Permissions

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