Wednesday, November 02, 2005

Delete Rows from Access Database Table Using VBA and SQL

Using the DoCmd property you can delete all rows in an Access Database table using Access VBA and SQL

Sub DeleteRows()

'Deletes all rows from tblName in an Access Database

DoCmd.RunSQL "DELETE tblName.* FROM tblName;"

End Sub

1 comment:

Anonymous said...

How about just one row, where the ContactID = Forms!frmMyForm!ContactID