Deleting Records via ADO : Access ADO « Access « VBA / Excel / Access / Word






Deleting Records via ADO

 
Public Sub ADOWipeOutAttribute(RecID)
    ' Establish a connection transfers.mdb
    MyConn = "C:\mydb.mdb"

    With New ADODB.Connection
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .Open MyConn
        .Execute "Delete From tblTransfer Where ID = " & RecID
        .Close
    End With
End Sub

 








Related examples in the same category

1.Creating a New Microsoft Access Database Using ADO
2.Using the Open Database Method
3.Refreshing a Link