irunergoiam
Registered User.
- Local time
- Yesterday, 21:31
- Joined
- May 30, 2009
- Messages
- 76
I'm trying to run the following from an On Click event, but I get a "Compile error: Expected: end of statement" error that highlights the From part of the statement " FROM 1STARTRequestLog ". See code below.
Any ideas what I'm missing?
SQL = "SELECT [1STARTRequestLog].Name AS [START Request For], [ApplicantID] & " - " & [Req] & " - " & [StartSysRequestID] AS [START Request], [1STARTRequestLog].EEID, [1STARTRequestLog].ApplicantID, [1STARTRequestLog].Req, [1STARTRequestLog].[Cost Center], [PL] & " - " & [Dept] AS [PL-Dept], [1STARTRequestLog].Ministry, [1STARTRequestLog].DeptName, [1STARTRequestLog].PositionCode, [1STARTRequestLog].System, [1STARTRequestLog].PermissionLevel, [1STARTRequestLog].DateEmail1, [1STARTRequestLog].TASORepEmail, [1STARTRequestLog].HireType, [1STARTRequestLog].ToSysAdminName, [1STARTRequestLog].ToSysAdminEmail, [1STARTRequestLog].CCSysAdminEmail1, [1STARTRequestLog].CCSysAdminEmail2" _
" FROM 1STARTRequestLog " & _
" WHERE ((([1STARTRequestLog].ApplicantID)=[Forms]![frmNewHireLegalNameVerification]![unbApplicantID]) AND (([1STARTRequestLog].Req)=[Forms]![frmNewHireLegalNameVerification]![unbReq]))" & _
" ORDER BY [1STARTRequestLog].Name; "
Any ideas what I'm missing?
SQL = "SELECT [1STARTRequestLog].Name AS [START Request For], [ApplicantID] & " - " & [Req] & " - " & [StartSysRequestID] AS [START Request], [1STARTRequestLog].EEID, [1STARTRequestLog].ApplicantID, [1STARTRequestLog].Req, [1STARTRequestLog].[Cost Center], [PL] & " - " & [Dept] AS [PL-Dept], [1STARTRequestLog].Ministry, [1STARTRequestLog].DeptName, [1STARTRequestLog].PositionCode, [1STARTRequestLog].System, [1STARTRequestLog].PermissionLevel, [1STARTRequestLog].DateEmail1, [1STARTRequestLog].TASORepEmail, [1STARTRequestLog].HireType, [1STARTRequestLog].ToSysAdminName, [1STARTRequestLog].ToSysAdminEmail, [1STARTRequestLog].CCSysAdminEmail1, [1STARTRequestLog].CCSysAdminEmail2" _
" FROM 1STARTRequestLog " & _
" WHERE ((([1STARTRequestLog].ApplicantID)=[Forms]![frmNewHireLegalNameVerification]![unbApplicantID]) AND (([1STARTRequestLog].Req)=[Forms]![frmNewHireLegalNameVerification]![unbReq]))" & _
" ORDER BY [1STARTRequestLog].Name; "