I'm getting "syntax error - missing operator" with the following code. I think the problem is in the GROUP BY part. I copied it out of the ROWSOURCE on a Chart and it had "MMM \'YY" but the double quotes won't work in a SELECT statement so I had to change them to single quotes which I think screwed up the single quote before YY. Yes? So how do I make this work? I think I'm close to making the chart work.
STRSOURCE = "SELECT [Bill-To DATE], [Therms] FROM [swg] " & _
"WHERE (([swg].[Bill-To DATE]) Between [Forms]![SWG Query]![startdate] " & _
" And [Forms]![SWG Query]![EndDate])" & _
" AND (([swg].Dept)=[Forms]![SWG Query]![combo17])" & _
"GROUP BY (Year([Bill-To Date])*12 + Month([Bill-To Date])-1),(Format([Bill-To Date],'MMM \'YY'))" & _
"ORDER BY ([swg].[Bill-To DATE])"
STRSOURCE = "SELECT [Bill-To DATE], [Therms] FROM [swg] " & _
"WHERE (([swg].[Bill-To DATE]) Between [Forms]![SWG Query]![startdate] " & _
" And [Forms]![SWG Query]![EndDate])" & _
" AND (([swg].Dept)=[Forms]![SWG Query]![combo17])" & _
"GROUP BY (Year([Bill-To Date])*12 + Month([Bill-To Date])-1),(Format([Bill-To Date],'MMM \'YY'))" & _
"ORDER BY ([swg].[Bill-To DATE])"