none
Outlook 2007 ribbon xml UI; how to use combobox value to populate another combobox RRS feed

  • Question

  • Hi,

    Anyone know how to use a ribbon xml combobox selected value to populate another combobox?? I can get the selected value but how will the 2nd combobox be updated every time a user selects an item. I use the value of combobox1 as an "FKEY" for the table source of combobox2.

    Any help would be appreciated, thanks!!

    Tuesday, September 18, 2012 3:27 AM

Answers

  • Solved it. :)

    Public Sub getTextSub(ByVal control As Office.IRibbonControl, ByVal text As String)
            strT = text 'get selected value of combobox1; store it on global var
            ribbon.InvalidateControl("cbobox2ID")
        End Sub
    by calling InvalidateControl it will trigger the combobox2 attributes again, thus you can populate combobox2 using the value of combobox1 in query

    • Marked as answer by Khem Oco Tuesday, September 18, 2012 4:17 AM
    Tuesday, September 18, 2012 4:17 AM

All replies

  • Solved it. :)

    Public Sub getTextSub(ByVal control As Office.IRibbonControl, ByVal text As String)
            strT = text 'get selected value of combobox1; store it on global var
            ribbon.InvalidateControl("cbobox2ID")
        End Sub
    by calling InvalidateControl it will trigger the combobox2 attributes again, thus you can populate combobox2 using the value of combobox1 in query

    • Marked as answer by Khem Oco Tuesday, September 18, 2012 4:17 AM
    Tuesday, September 18, 2012 4:17 AM
  • Hi Khen,

    I'm glad to hear you have solved it by yourself. Thanks for sharing your experience here, it really beneficial for other community members who have similar problem to see how you solved it.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 19, 2012 4:54 AM
    Moderator