Synthax error

Denker

Registered User.
Local time
Today, 10:34
Joined
Dec 17, 2012
Messages
11
Can enyone tell me where could be mistake in code:
Some oprerators are missing and I cant figure it out which they are

Private Sub Command1_Click()
Dim TblName As String
Dim StrSql As String
Dim fromTabela As String
TblName = InputBox("Table name")
fromTabela = InputBox("From table")
StrSql = "SELECT [" & fromTabela & "].[Šifra_komitenta] " & _
"INTO" & TblName & _
"FROM [" & fromTabela & "] ;"
CurrentDb.Execute StrSql, dbFailOnError

THanks
 
You are missing spaces.

StrSql = "SELECT [" & fromTabela & "].[Šifra_komitenta] " & _
"INTO" & TblName & _
"FROM [" & fromTabela & "] ;"
Correct is:
StrSql = "SELECT [" & fromTabela & "].[Šifra_komitenta] " & _
" INTO" & TblName & _
" FROM [" & fromTabela & "];"
 
It still showes same mistake. I copied your "Quote" but nothing has changed.
Any other solution?????????
 
I see I'm missing a space too: " INTO" it has to be: " INTO "
If not, then insert a MsgBox(StrSql) in your code and show the result here.
 
It Works now !!!!!

Thank you a lot ,

Best regards
 

Users who are viewing this thread

Back
Top Bottom