Combo box

  • Thread starter Thread starter EMILYTAN via AccessMonster.com
  • Start date Start date
If your RowSource is a Value List, the following code demonstrates how to add
a value thru VBA, where the control TextBoxValueToAdd holds the new item to
be added:

Private Sub AddValueToComboboxButton_Click()
If Not IsNull(TextBoxValueToAdd) Then
YourComboBox.RowSource = YourComboBox.RowSource & ";" & Me.
TextBoxValueToAdd
End If
End Sub
 
How to set value to list?
How if I want to add the item through this:-
Private Sub Form_Load()
cboOracle.AddItem "Yes"
cboOracle.AddItem "No"
End Sub
 
Back
Top