Currently I am having a problem with importing data from an access table using an SQL statement via VBA. The table is a simple one, with Column 1 (called FName) and holds a list of first names. Column 2 (called LName) and holds a list of of last names. My string is as follows:
If I exclude the "FName" column, the data is imported. However, I only get the column of last names (LName).
I cannot find a resolution on this...Need help on this
MySQL = "SELECT LName, FName" & _
" FROM tblClientNames" & _
" GROUP BY LName"
With the above string, I get an error message (run-time error '-2147217887(80040e21) with the message "You tried to execute a query that does not include the specified expression 'FName' as part of an aggregate function"" FROM tblClientNames" & _
" GROUP BY LName"
If I exclude the "FName" column, the data is imported. However, I only get the column of last names (LName).
I cannot find a resolution on this...Need help on this