Private Sub ListBoxFunctionk(lstBox As ListBox)
'Declare and initialize variables
Dim i As Integer
Dim strSQL As String
'Make sure the listbox has something in it
If Nz(lstBox, "") <> "" Then
'Loop through the list items
For i = 0 To lstBox.ListCount - 1
'SQL to update table 1
strSQL = "" 'write your insert statment here
currentdb.execute strSQL
'SQL to delete from table2
strsql = "" 'write your delete statement here
currentdb.execute strSQL
Next i
End If
End sub
|