I have several listboxs on my form , How do i delete the row i select?
Hey Faz,
I did a little bit of a search and found this question and answer that seems to be what your looking for, so give this a try and see if it does.
John Nurick (Microsoft MVP) is the individual who gave the answer:
Dim strSQL As String
strSQL = "DELETE * FROM MyTable WHERE KeyField=""" _
& Me.lbXXX.Value & """;"
CurrentDB.Execute strSQL
Me.lbXXX.Requery
You'll need to replace
MyTable with the name of the table
KeyField with the name of the field in the table corresponding
to the bound column in the listbox
lbXXX with the name of the listbox (*not* the name of the field
the listbox is bound to).
HTH,
Shane