+ Reply to Thread
Results 1 to 3 of 3

Thread: macro code to delete table data

  1. #1
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    141

    macro code to delete table data

    Hello all,

    I am experienced with Excel macros but have no experience with Access macro coding. I am currently doing the basic TranferSpreadsheet action to import a excel workbook. The problem i have is , i need all records in the table to be cleared out when i run the macro. i can't have records building up in the table because of other things i do with the data. Can someone share some code that can do this . Thanks
    Last edited by Traymond; 01-16-2011 at 06:41 PM.

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,155

    Re: macro code to delete table data

    See attached as to how I do it. I delete the whole table and set up the importation to create a new table. In this case there is a further step that joins two tables and then exports the results back to an excel spreadsheet. Look at the code behind each of the command buttons. Post back with any questions you may have.

    Alan
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    141

    Re: macro code to delete table data

    Alan,

    That was just what i was needing to look at. I can modify what you gave me to work for my situation. Thanks so much for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0