Hey guys,
I've been searching the forums and I can't seem to make heads or tails out of this error. I looked through my SQL statement to find a duplicate field and no dice on that. Heck of it is, I made the append query like normal and it works. I copied the SQL and put it into a module, and it doesn't work! Can anyone spot whats wrong here? I'm pretty new to messing with SQL:
I've been searching the forums and I can't seem to make heads or tails out of this error. I looked through my SQL statement to find a duplicate field and no dice on that. Heck of it is, I made the append query like normal and it works. I copied the SQL and put it into a module, and it doesn't work! Can anyone spot whats wrong here? I'm pretty new to messing with SQL:
Code:
strSQL = "INSERT INTO tblEmpInfo (AccountNumber, AgentID, Name, HireDate, TermDate, ActiveFlag, ProcCode, Dept, DeptDesc)" & _
"SELECT tblInput.AccountNum, Right(EMP_ID,5) AS AgentID, EWFM_EmpInfo.EMP_SORT_NAME, EWFM_EmpInfo.EMP_EFF_HIRE_DATE,EWFM_EmpInfo.EMP_TERM_DATE, EWFM_EmpInfo.EMP_ACTIVE_FLAG, EWFM_EmpInfo.EMP_EXTRA_2, EWFM_EmpInfo.EMP_CLASS_2, EWFM_EmpInfo.EMP_CLASS_2_DESCR," & _
"*FROM tblInput INNER JOIN EWFM_EmpInfo ON EWFM_EmpInfo.EMP_SORT_NAME = tblInput.Name"