• ListIndex property (97)

    Author
    Topic
    #377356

    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.

    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

    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

    Viewing 1 reply thread
    Author
    Replies
    • #621309

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

      • #621603

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

        • #621718

          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.

    • #621406

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

      You could use: ctl = ctl.ItemData(0)

    Viewing 1 reply thread
    Reply To: ListIndex property (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: