Combo box

  • Thread starter EMILYTAN via AccessMonster.com
  • Start date
M

missinglinq via AccessMonster.com

Is your combobox's Row Source Type Table/Query or Value List?
 
M

missinglinq via AccessMonster.com

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
 
E

EMILYTAN via AccessMonster.com

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
 
Top