Question : Use VB in Excel to pull data from Access

I am trying to create a macro in Excel that will run a query against an Access database then populate the data into a sheet.
I have a macro that will work (Marcro name = "ThisWorks")
I have another macro that doesn't work (Macro name = "ThisDoesnt")
The only difference in the two is the SQL statement.

When I run macro ThisDoesnt, the debugger highlights this line of the code:
     .Refresh BackgroundQuery:=False

I don't know why the larger SQL statement will not work.

Any ideas???
Attachments:
 
The Database
 
 
Excel file with Macros
 

Answer : Use VB in Excel to pull data from Access

Change the first line to:

"SELECT TBLusers.[User ID], TBLusers.User, SUM(Summary.[Total_Color]) As [230_Total_Color], SUM(Summary.Total_Black) As [230_Total_BW], SUM(Summary.[Total_Color]+Summary.Total_Black) As Grand_Total " & _


Random Solutions  
 
programming4us programming4us