the select statement includes a reserved word or argument name that is misspelled or missing, or the punctuation is incorrect - VBA Excel

Viewed 63
strQuery1 = "SELECT 'Health Start Lite' AS HSL_RAW_ProductName, Max(HSL_RAW.[DateCreated]) AS MaxOfDateCreated," & _
"HSL_RAW.[Premium], Last(HSL_RAW.[FirstName]) AS LastOfFirstName, HSL_RAW.[LastName]," & _
"HSL_RAW.[EmailAddress], HSL_RAW.[MobileNumber], HSL_RAW.[Partner], Last(HSL_RAW.[Stage]) AS LastOfStage" & _
"FROM ...
1 Answers

There is a space missing between LastOfStage and FROM. Should be:

 "... AS LastOfStage" & _
 " FROM ..."

Note the space before FROM.

Related