Error in Query Syntax??

sportsguy

Finance wiz, Access hack
Local time
Today, 00:42
Joined
Dec 28, 2004
Messages
363
I am using ADO to connect to an access 2007 database and retrieve data.

I am repeating the process for different query extracts on different tabs. the VBA code is in a module and all other queries work.

This query doesn't work due to syntax, and i have tried three ways,
and none of them work. The query creates an index by concatenating two access fields. . . . How can i create a concatenated field in excel VBA to retrieve from two fields in MS Access?

thanks

sportsguy

Code:
strSQL = "SELECT CTC.Market & '-' & CTC.Bucket As Index, Sum(CTC.Field) AS FFP " & _

    "FROM CTC " & _
    "GROUP BY CTC.Market & '-' & CTC.Bucket;"

any suggestions ?
 
Try changing the alias Index to a different one as this is a reserved word.
 

Users who are viewing this thread

Back
Top Bottom