Consulting

Results 1 to 3 of 3

Thread: Excel procedure to run Access Query using ADO

  1. #1

    Excel procedure to run Access Query using ADO

    Hello the VBA expert,

    I am able to use ADO method in Excel procedure to look up for information in Access and export the data back to the same sheet in Excel. I saved the xls and mdb files in C:\Data\

    My problem is when I run the procedure the second time, it append the data to the Table "refTable1". I created a delete query named "delete_refTable1". I need help how to run this saved query before it will continue to copy the Excel to the Table "refTable1". Can someone please help. Thanks in advance.

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    If you have an ADO connection established, you should just be able to use:
    conn.Execute "delete_refTable1"
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Thanks Rory. I use cn.Execute

Posting Permissions

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