Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Posts
    2

    Unanswered: ListBox.Value not updating

    Hello everyone,

    I faced a problem where after repopulating my list with data .Value of my list box is not updating if it disappears from the list.

    For example I have a list box:
    "something1"
    "something2"
    "something3"

    I select "something2" and press my refresh button. If "something2" is no longer exists nothing will be selected but .Value will be still "something2".

    How can I fix this?

    Thank you.

  2. #2
    Join Date
    Feb 2012
    Posts
    2
    I also have one more button and basically I need it to be enabled only when something is selected on the list.

  3. #3
    Join Date
    Jan 2012
    Posts
    97
    Is the list box a bound or unbound control? If its unbound then you can set the value to null when running the code on your refresh button.
    As for your other button I would run some code in the OnChange event of your listbox, something like...

    Code:
    If me.listboxname.value = "thevalueyourlookingfor" Then
    me.nameofcommandbutton.enabled = True
    Else
    me.nameofcommandbutton.enabled = False
    End if
    Hope this helps,
    Dave

Posting Permissions

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