Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8487181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:09:52+00:00 2026-06-10T21:09:52+00:00

at the first, I should explain my scenario to declare what I will do:

  • 0

at the first, I should explain my scenario to declare what I will do:

I want to merge records in one Table and then save them in another table.
Why?
I had a very complex query which needs long time to run and give back the result. I decided to divide this query into two query and save the resulat of the first query into a table and then the second query use the new generated table
the source table is often updated and the generated table must be generated too
If I use this code on my VBA this error occured:
Error 3010 Table already exist

Set db = CurrentDb
  ssql = "SELECT DISTINCT tb_KonzeptDaten.DFCC,  " _
  & "tb_KonzeptDaten.OBD_Code AS Konzept_Obd,tb_KonzeptDaten.DFC " _
  & "INTO Test_Table FROM tb_KonzeptDaten"
  db.Execute ssql, dbFailOnError
  RecordsUpdated = db.RecordsAffected

have you any idea ? do we have another SQL statement to do this job?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:09:54+00:00Added an answer on June 10, 2026 at 9:09 pm

    You can delete the table in VBA if it already exists and then run the query.

    tblName = "TableX"
    tbl = DLookup("Name", "MSysobjects", "Type=1 and Name='" & tblName & "'")
    
    If Not IsNull(tbl) Then
        DoCmd.DeleteObject acTable, tbl
    End If
    

    Or

    Set db = CurrentDb
    ssql = "DELETE FROM Test_Table"
    db.Execute ssql, dbFailOnError
    
    ssql = "INSERT INTO Test_Table SELECT DISTINCT tb_KonzeptDaten.DFCC,  " _
      & "tb_KonzeptDaten.OBD_Code AS Konzept_Obd,tb_KonzeptDaten.DFC " _
      & "FROM tb_KonzeptDaten"
    db.Execute ssql, dbFailOnError
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First you should know I have looked into many questions and none of them
Maybe I should first give an idea of what I want to accomplish as
Why is it that both outs are printing 84? The first one should read
First of all, I should explain what I'm trying to do first. I'm creating
I need a help. Let me first explain the scenario with a small sample.
I'm using Subclipse 1.6x plugin in Eclipse. Let me explain the scenario first: Say
I would like to implement a simple AR desktop application. This application should first
The above expression is working fine. this expression means first leter should start with
First off I should say that I don't have any experience in working with
I have created a file argument.pl which takes several arguments first of which should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.