dharkangel
MIS
Hi,
I've done this in the past but today, I can't get it to work. I'm trying to do an INSERT that grabs data from another table through a subquery SELECT statement. I am receiving a 'error in INSERT Statement' error:
'populate UsersTable
strSQL = "INSERT INTO UsersTable ([myName], [myEmail]) " & _
"(SELECT getAllUsers.[myName], getAllUsers.[myEmail] FROM getAllUsers) AS D " & _
"GROUP BY [myName];"
DoCmd.RunSQL strSQL
thank you,
I've done this in the past but today, I can't get it to work. I'm trying to do an INSERT that grabs data from another table through a subquery SELECT statement. I am receiving a 'error in INSERT Statement' error:
'populate UsersTable
strSQL = "INSERT INTO UsersTable ([myName], [myEmail]) " & _
"(SELECT getAllUsers.[myName], getAllUsers.[myEmail] FROM getAllUsers) AS D " & _
"GROUP BY [myName];"
DoCmd.RunSQL strSQL
thank you,