Remove selected item from a combobox

aman

Registered User.
Local time
, 18:16
Joined
Oct 16, 2008
Messages
1,251
Hi All

could anyone please help me ow to emove the selected item from a combobox..i used varioua ways but it doesn't work e.g

1. ComboBox1.RemoveItem ComboBox1.ListIndex
2. Private Sub cmdDelete_Click()
'For I = 0 To ComboBox1.ListCount - 1

'If ComboBox1.ListIndex(I) = Val(ComboBox1.Text) Then
' ComboBox1.RemoveItem (ComboBox1.ListIndex)

'Exit For
'End If
'Next

3. ComboBox1.RemoveItem (ComboBox1.ListIndex)

out of the above methods ,noone works...

please help me resolve it

Regards
Aman
 
What's your combo box's ROW SOURCE property? Are you using a value list or a query?
 
Hi

I am using value list as row source property.

could you please put me in right direction

regards
aman
 
Have a look at the following thread

http://www.access-programmers.co.uk/forums/showthread.php?t=166226&highlight=combo+list

You might want to use the search facility within the forum as well to interrogate old threads. It is a common error by people who haven't used knowledge forums that they are not aware that the majority of problems have been asked multiple times before and extensively discussed.

In my time here I've not been able to come up with a question yet that hasn't already been asked.
 

Users who are viewing this thread

Back
Top Bottom