We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub btnDelete_Click() Dim frm As Form Dim ctl As Control Dim db As DAO.Database Dim strsql As String Dim i As Variant Set frm = Forms("frm_SubTaskOrders") Set ctl = frm![lstSubTaskOrders] Set db = CurrentDb For Each i In ctl.ItemsSelected strsql = "DELETE FROM SubTaskOrders WHERE" [STOid] = " & ctl.Column(0, i)" & " AND [STONo] = " & ctl.Column(1, i) & " AND [STOName] = " & ctl.Column(2, i) & " And [Toid] = " & ctl.Column(3, i) db.Execute strsql, dbFailOnError Next i ctl.Requery CurrentDb.Execute strsql, dbFailOnError End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.