just wondering if there was any way to disable some values in the combobox or at least grey them out.

i populate the combo box from the database:
rs.MoveLast
With Me.Combo1
.Clear
Do
.AddItem rs.Fields("CustomerFirstName")
rs.MoveNext
Loop Until rs.EOF
End With

once one value has been selected, is there a way to disable it from being selected in the combo box or even delete the one value from the combobox but keep it in the database.

thanks

once one value has been selected, is there a way to disable it from being selected in the combo box or even delete the one value from the combobox but keep it in the database.

This following code to remove selected combo box item.

Private Sub Combo1_Click()
    Combo1.RemoveItem Combo1.ListIndex
End Sub

Thank you Sir !!!

wah, been looking for this one! so its just as easy as this? thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.