Missing Operator Syntax for SQL

thmsjlmnt3953

Registered User.
Local time
Today, 13:47
Joined
May 20, 2014
Messages
120
Probably a really simple one however i just can spy the missing part hopefully one of you guys/girls can? Any help would be fantastic..


Code:
Dim AppendUsers As String
AppendUsers = "INSERT INTO tblPermissions ( empid )" & _
              "SELECT tblEmployee.empid" & _
              "FROM tblEmployee LEFT JOIN tblPermissions ON tblEmployee.[empid] = tblPermissions.[empID]" & _
              "WHERE (((tblPermissions.empID) Is Null) AND ((tblEmployee.active)=Yes) AND ((tblEmployee.inputname)=Yes));"
If MsgBox("This will search for new users with valid logins and add to the permissions table, do you wish to continue?", vbYesNo, "Append Users") = vbYes Then
DoCmd.RunSQL (AppendUsers)
 
Hi,
Its printing out the whole string yet still fires a syntax/missing operator error, when i paste it into a blank query in builder and format it it runs as should?
 
Hi,
Its printing out the whole string yet still fires a syntax/missing operator error, when i paste it into a blank query in builder and format it it runs as should?

I guess the above sentence means it works. Or perhaps not. Just let's keep them guessing :D
 
Please show us the string that was printed to the Immediate window............
 

Users who are viewing this thread

Back
Top Bottom