Arg81
Well-known member
Hi Guys,
Hope someone can help
I have a combobox which is I've put in items at design time.
I've set the combobox as a dropdown so that text can be added if the item isn't in the list.
What I want to do, is if the user types in something which isn't in the list, when the form is saved, it runs a command to save that text as a new item in the combobox.
I've tried;
If Not cboProductUsage.Items.Contains(cboProductUsage.Text) Then
cboProductUsage.Items.Add(cboProductUsage.Text)
End If
But that doesn't work, although there are no errors.
Has anyone done anything similar or got a solution for me to try?
Kind Regards,
Luke
Hope someone can help
I have a combobox which is I've put in items at design time.
I've set the combobox as a dropdown so that text can be added if the item isn't in the list.
What I want to do, is if the user types in something which isn't in the list, when the form is saved, it runs a command to save that text as a new item in the combobox.
I've tried;
If Not cboProductUsage.Items.Contains(cboProductUsage.Text) Then
cboProductUsage.Items.Add(cboProductUsage.Text)
End If
But that doesn't work, although there are no errors.
Has anyone done anything similar or got a solution for me to try?
Kind Regards,
Luke