none
Adding text to a Combo Box! RRS feed

  • Question

  • I have a combo box in a sub form that is on 2 separate forms, if I open FormB, I want the word "Lameness" to be entered into the combo box "cmbCategory" thanks for any help............Bob

    xxx

    Tuesday, July 19, 2016 11:07 PM

Answers

  • Hi,

    >>I have a combo box in a sub form that is on 2 separate forms, if I open FormB, I want the word "Lameness" to be entered into the combo box "cmbCategory"

    How do you create the combo box, what is the Row Source Type of your combo box?

    Enter text into a combo box, use Forms![FormName]![SubformName].Form![ComboboxName].Text in the Form_Open event.

    Use the following syntax

    Private Sub Form_Open(Cancel As Integer)
    
    Forms![FormB]![FormB Subform].Form![cmbCategory].Text= "Lameness"
    
    End Sub


    Thursday, July 21, 2016 9:40 AM
    Moderator