I am trying to build a new sql statement from items i am selecting from a listbox on a form. I have built the string for variables but am having trouble with the syntax on the visual basic code for the new sql statement. i am receiving a "Run-time error '3075': syntax error (missing operator) in query expression."
Below is my code
strSQL = "SELECT JG_tbl_LMEMP.DEPT_CODE" & _
" FROM JG_tbl_LMEMP" & _
" Group by JG_tbl_LMEMP.DEPT_CODE" & _
" Where JG_tbl_LMEMP.DEPT_Code IN(" & strCriteria & ")"
qdf.SQL = strSQL