0

Hello ,


I'm using ms access 2003, i'm trying to delete the selected data that is the name of employee, from the combobox list when i click to delete button. i'm using this code:

Private Sub cmdDelete_Click()

   For I = 0 To combobox.ListCount - 1
           
        If combobox.ListIndex(I) = combobox.Text Then
            combobox.RemoveItem (I)
            Exit For
        End If
    Next
End Sub

but its not working can anybody tell me how to delete the selected items from combobox.


Thanks and Regards

rekha

4
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Jx_Man
0
Private Sub CmdDelete_GotFocus()
if trim(combo1.text) = vbnullstring then combo1.setfocus
End Sub

Private sub CmdDelete_Click
if trim(combo1.text) <> vbnullstring then
con.execute "Delete From EmployeeDet Where EmpName='" & trim(combo1.text) & "'"
end if
End Sub
0

The above all Suggestion are not working .
is here anyone who can solve this problem?

How About make your own thread and post your current code..
Don't rise old thread..

0

The above all Suggestion are not working .
is here anyone who can solve this problem?

How About make your own thread and post your current code..
Don't rise old thread..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.