Good afternoon Everyone,
Well it's easy to see why people don't break out of the box and try new stuff.
You never really get it right the first time, and then you need to force yourself to work through it.
I've been building databases in Access since 1995 and until now I have never needed to write a single line of SQL, and last week marked the first time ever to make a loop since my days playing around with DOS BASIC. . .
when dinosours roamed.
Could someone please tell me why this SQL statement copied directly from a saved query doesn't work in VBA
It works fine in a saved query.
From the module, It returns this error
Run-time error '3075':
Syntax error (missing operator) in query expression
'tblUserLogin.LocconIDFROM tblUserLogin'.
Thanks all,
Joe
Well it's easy to see why people don't break out of the box and try new stuff.
You never really get it right the first time, and then you need to force yourself to work through it.
I've been building databases in Access since 1995 and until now I have never needed to write a single line of SQL, and last week marked the first time ever to make a loop since my days playing around with DOS BASIC. . .
when dinosours roamed.
Could someone please tell me why this SQL statement copied directly from a saved query doesn't work in VBA
Code:
Private Sub Command2_Click()
DoCmd.RunSQL "INSERT INTO temp ( UserLoginName, LocconID )" & _
"SELECT tblUserLogin.UserLoginName, tblUserLogin.LocconID" & _
"FROM tblUserLogin;"
End Sub
From the module, It returns this error
Run-time error '3075':
Syntax error (missing operator) in query expression
'tblUserLogin.LocconIDFROM tblUserLogin'.
Thanks all,
Joe
Last edited: