+ Reply to Thread
Results 1 to 3 of 3

macro code to delete table data

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

    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 07:41 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    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
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

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

    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.6.0 RC 1