D J
asked on
MS Access How can I convert this code from inserting to delete records?
MS Access How can I convert this code from inserting to delete records?
Private Sub Command0_Click()
On Error Resume Next
Dim varList1 As Variant, varList3 As Variant
Dim strSQL As String
For Each varList1 In Me.List1.ItemsSelected
For Each varlist2 In Me.List3.ItemsSelected
strSQL = "INSERT INTO tbl_Join_Proj_Cust (CustID, DeviceID) " _
& "Values (" & Me.List1.ItemData(varList1) & ", " _
& Me.List3.ItemData(varlist2) & ")"
CurrentDb.Execute strSQL, dbFailOnError
Next varlist2
Next varList1
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help you.
ASKER