Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Location
    port macquarie
    Posts
    1

    Delete all records in a table?


    I want to place code in a click event to delete all records in a table but keep the table for new records. DELETE * FROM Employees WHERE Title = 'Trainee'; seems to have trouble with the asterisk.

  2. #2
    Join Date
    May 2007
    Posts
    1
    Dim db As dao.Database
    Set db = CurrentDb()
    db.Execute "Delete * From [" & TableName & "]"
    Set db = Nothing

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Inserting multiple records into a table
    By New2Access in forum Programming
    Replies: 1
    Last Post: 07-07-2011, 09:18 PM
  2. Replies: 0
    Last Post: 08-25-2008, 12:17 PM
  3. Creating a string from all records in a table
    By ocordero in forum Programming
    Replies: 2
    Last Post: 08-07-2006, 09:21 AM
  4. Replies: 1
    Last Post: 03-17-2006, 12:04 PM
  5. Delete query, deleting customers froma table.
    By keithsrobinson in forum Queries
    Replies: 2
    Last Post: 02-14-2006, 11:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums