Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ListIndex property (97)

    ListIndex property
    I created a RESET button my command bar that looks at a command bar controls tab property & based on that sets the combo controls list index to zero.

    <pre>Public Function genericCase(intCase As Integer)
    Select Case intCase
    'resets every combo box in "Filter Toolbar" except YEAR & TYPE...
    Case 2
    For Each ctl In CommandBars("Filter Toolbar").Controls
    Select Case ctl.tag
    Case 3, 4, 5
    ctl.ListIndex = 0
    End Select
    Next ctl
    End Select
    End Function</pre>



    But now it seems that whenever I choose something from the combo box, it reverts back to index 0. I created the reset button b/c without it, I couldn

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ListIndex property (97)

    How is function genericCase called?
    Is it called other than by the reset button?
    Where does the function get its argument?
    David Grugeon
    Brisbane Australia

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: ListIndex property (97)

    Unfortunately this will never work, as the ListIndex property is read-only.

    You could use: ctl = ctl.ItemData(0)
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ListIndex property (97)

    Sorry, let me rephrase my problem a little. For some using the system, the errors don

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ListIndex property (97)

    I think you must have an event driven requery or recalc of the form with the combo box. This might be in the lostfocus event of the combobox or the form or 'somewhere else'. If the form is requeried it will set the cbo back to 0.
    David Grugeon
    Brisbane Australia

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ListIndex property (97)

    No, this is a command bar we

Posting Permissions

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