How do i correct syntax error?

How to get rid of Syntax Error in Access?

  • I have done this for other tables and they all worked fine, however I don’t know what’s wrong this time and I just can’t fix it. My code line is CurrentDb.Execute "INSERT INTO tblTemp (FieldA, FieldB) SELECT FieldA, FieldB FROM tblOriginal;" The error I keep getting is Run-time error ‘3134’: Syntax error in INSERT INTO statement. Before that I had CurrentDb.Execute "delete * from tblTemp" DoCmd.SetWarnings False Again I did this for different tables and they all worked fine. I don’t know what it wouldn’t work for these specific tables this time. The tables have the same field names, same number of fields, and same data types. Please help! Thanks!

  • Answer:

    Hi, Perhaps u have put a semicolon at the end of the query. CurrentDb.Execute "INSERT INTO tblTemp (FieldA, FieldB) SELECT FieldA, FieldB FROM tblOriginal;"

Victoria at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.