Make Your Microsoft Dynamics Investment Count & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.
Dim frm As Form Dim ctl As Control Dim db As DAO.Database Dim strsql As String Dim i As Variant Set frm = Forms("f_SubTaskAssignments") Set ctl = frm![lstExistingAssignments] Set db = CurrentDb For Each i In ctl.ItemsSelected strsql = "DELETE FROM SubTaskAssignment WHERE " & _ "[TaskOrderID] = " & ctl.Column(0, i) & " AND [SubTaskID] = " & ctl.Column(5, i) & " And [CompanyID] = " & ctl.Column(6, i) & " And [PersonID] = " & ctl.Column(7, i) & " And [ReportAs] = " & ctl.Column(4, i) db.Execute strsql, dbFailOnError ctl.Requery Next i 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.