473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Run-time error'-2147217900(80040e14)': in vba access 2003

23
I craft a access vba code.
I got this error message while trying to run:
Run-time error'-2147217900(80040e14)':
The SELECT statement includes a reserved word or an argument name thht is misspelled or missing,or the punctuation is incorrect.
The SQl code is"
Expand|Select|Wrap|Line Numbers
  1. strSQL = "SELECT " & strFldname & _
  2.                         "INTO " & strTempTable & _
  3.                         "FROM " & strLftTableName & _
  4.                         "LEFT JOIN tablename " & _
  5.                         "ON (tablename_SP.Fieldname = " & strLftTableName & ". fieldname) " ' " & _
  6.                         "ORDER BY Login ASC,UserName"
Mar 28 '12 #1

✓ answered by mshmyob

Try putting spaces before the words INTO, FROM,and LEFT.

Also I wonder if in your LEFT JOIN part of the statement if 'tablename' is really the name of your table? If so that is a bad name for a table name.

To see what is wrong with the syntax just popup a message box with the strSQL variable and you can easily see what Access sees.

cheers.

2 5101
mshmyob
904 Expert 512MB
Try putting spaces before the words INTO, FROM,and LEFT.

Also I wonder if in your LEFT JOIN part of the statement if 'tablename' is really the name of your table? If so that is a bad name for a table name.

To see what is wrong with the syntax just popup a message box with the strSQL variable and you can easily see what Access sees.

cheers.
Mar 28 '12 #2
NeoPa
32,556 Expert Mod 16PB
Please refer to How to Debug SQL String. This is a very common error which would be avoided if only a little thought is invested prior to posting your question.

Mshmyob is perfectly correct of course. This doesn't reflect on the answer, just that you asked the question the way you did. Please check that link before posting again.

PS. Clearly you didn't get the error message from running that line of code as that line simply creates a string and assigns it to a variable. The error message is for another line where an attempt is made to execute the SQL within that string. How anyone can imagine that posting such a question without showing the contents of the string makes any sense is beyond me.
Mar 28 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ian Barnes | last post by:
I have a VB6 program that uses standard ADO 2.5 connection to read and write to an Access 97 database on a Windows 98 machine. The same program is run by a number of other people who use Windows 98...
1
by: Wayne Aprato | last post by:
I have a client who is running several Access 97 databases that I have written for them. They are about to upgrade to Access 2003. Is the default file format of Access 2003 still Access 2000 the...
4
by: Wayne Aprato | last post by:
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am...
0
by: Steve | last post by:
Greetings, I'm having problems with the use of an Access 2003 Add-In on Windows XP Pro. Administrative-level users have no problems running the Add-In, but those users with restricted rights on...
2
by: Kelt | last post by:
I have a user who currently has Access 97 installed on her PC. She has purchased a new PC and would like to have Access installed on it. She would like to upgrade her current Access to Access...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
7
by: Richard Hill | last post by:
Hi, I need Access 2003, and the means to distribute my applications, but I cant work out exactly which software I need to purchase. I am based in the UK, and have Office XP developer edition to...
0
by: Wayne | last post by:
Can anyone cast any light on the following. I have a database that I have written in Access 2003 using 2000 file format. Everything was working OK when running it under Access 2003 but when I...
3
by: Dave | last post by:
Hi, I wrote a VBA program to read and process data from an ODBC source and put it into an Access database. I want to make the program into an MDE file and run it on systems with Access 2003. ...
18
by: Dennis | last post by:
Greetings. I want to run the two versions of Access on the same machine (2003 & 2007). I still need 2003 for most of my work, yet I need to start learning 2007. In my previous attempts at this,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.