Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    395

    Unanswered: Re: code to remove data w/o deleting tbl

    Hi,
    WHat is the code to remove all records in SQL Server table w/o deleting structure of the table ?

    I tried DoCmd.DeleteObject acTable, "tblSamples_completed" it deletes the table object.
    Is Drop TABLE the right syntax in VBA?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The safe answer would be:
    Code:
    DELETE FROM tblSamples_completed
    The quick answer would be:
    Code:
    TRUNCATE TABLE tblSamples_completed
    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •