Private Sub cmdDeleteSelectedRecords_Click()
Dim strSQL As String
Dim strTable As String
strTable = "tblContacts"
strSQL = "DELETE " & strTable & ".*, IsSelected " _
& "From " & strTable & " WHERE IsSelected=True;"
Debug.Print "SQL string: " & strSQL
DoCmd.RunSQL strSQL
End Sub
|