Results 1 to 4 of 4
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    empty a table/delete all records

    Hi



    working ona table and realised I made a fundemental error.

    I've imported 3000 records in error

    Is there an easy way to delete these records other than delete the table and start again?

    A google search suggests vba etc etc

    thanks

    Ian

  2. #2
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Manually - open a table, click its left top corner (with an arrow) and press Delete.
    VBA - DoCmd.RunSQL "DELETE * from TableName"

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  4. #4
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    updates

    Hi

    yes I did but I got the syntax totaly wrong hence it threw up an error
    for some reason I had

    Code:
    DELETE tbl_Marriage.*
    FROM tbl_Marriage;
    Whereas your code worked perfectly

    thanks

    Ian

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

Similar Threads

  1. Replies: 1
    Last Post: 10-07-2015, 11:33 AM
  2. Delete does not delete records in evey table
    By LaughingBull in forum Access
    Replies: 5
    Last Post: 09-01-2015, 04:05 PM
  3. Delete Empty Cell
    By bharatdubole in forum Forms
    Replies: 2
    Last Post: 11-29-2012, 01:19 AM
  4. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  5. Delete empty entires
    By justinwright in forum Queries
    Replies: 3
    Last Post: 07-22-2010, 11:27 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