none
how to pass the value of combo box control to a calling function in VBA code Window RRS feed

  • Question

  • Hello all,

    I have a mainform that contains a combo box:

    The combo box contains two values: hosID and hosName

    The combo box only shows hosName

    I want to capture the recordID (hosID) of the selected itme in combo box and passed to a VBA code:

    Call AuditChanges(??????)

    What should it be passed to this function?

    Regards,

    cloudsinsky


    CloudsInSky

    Friday, February 10, 2017 5:34 AM

All replies

  • If the bound column of the combobox is hosID then you get it with

      Me!MyCombo

    To see which column is which, check what is returned by

      Me!MyCombo.Column(0)

      Me!MyCombo.Column(1)

    Matthias Kläy, Kläy Computing AG

    Friday, February 10, 2017 9:46 AM