View Single Post
  #2 (permalink)  
Old January 8th, 2007, 08:43 AM
mmcdonal mmcdonal is offline
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Use a DELETE query.

Open the query designer, select the table you want to delete records from. Select * as the field (this will select all fields) and then on the menu bar, select Queries > Delete Query.

When you run this query, it deletes all records from the chosen table.

To run this using code (and not throw message boxes) use this:

DoCmd.SetWarnings False
DoCmd.OpenQuery "qryMyDeleteQuery"
DoCmd.SetWarnings True

Now you just have to create a button or other event to run the query.

Did that help?



mmcdonal