How do I delete all records in an access table while referencing them through a recordset?
Thanks,
Marc
Printable View
How do I delete all records in an access table while referencing them through a recordset?
Thanks,
Marc
With your connection object:
First connect the connectionobject to the database in question then execute a delete statement:
ConnectionObject.Open
ConnectionObject.Execute("DELETE FROM tablename")
This will delete all the records in the table
HTH,
Preeti
Another simple way to do it is to write a delete query in Access with a couple of parameters, then pass the parameters. Make the Database do the work, not the program.
Jason