MS Access 2013, Delete and ODBC table using a macro or code

Posted on 2014-08-06
1 Endorsement
Last Modified: 2014-08-07
I have linked a table from oracle to my MS access db using an ODBC connection to Oracle. The table name is CFR_Pivot. I want to have vba code or a macro to delete this linked table so that it is no longer connected to my Access DB when users wish to remove it.

Question please provide me with the syntax for vba or the steps you recommend to use in a macro.

Thanks for your assistance in advance

Question by:Lou Dufresne
    LVL 33

    Accepted Solution

    To delete a table -

    DoCmd.DeleteObject acTable, "ImportErrors"

    Open in new window

    This will physically delete a local table or simply delete the link for a linked table.
    LVL 1

    Author Closing Comment

    by:Lou Dufresne
       Thanks this worked perfectly
        I am placing another request out there to refressh an ODBC linked table. Please search for it If you know the code


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
    This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now