Ben_Entrew
Registered User.
- Local time
- Today, 13:07
- Joined
- Dec 3, 2013
- Messages
- 177
Hi all,
I try to create a cross tab query via SQL.
Somehow the below code return me a Run-Time Error '3000'.
Can someone please help me out here?
Thanks in advance.
Regards,
Ben
I try to create a cross tab query via SQL.
Somehow the below code return me a Run-Time Error '3000'.
Can someone please help me out here?
Thanks in advance.
Regards,
Ben
Code:
Sub TEST2()
Dim strSQL As String
DoCmd.SetWarnings False
strSQL = "TRANSFORM Sum(REALIZED_SALES_QUANTITIES.[Sales_Quantity]) AS SumOfSales_Quantity " & _
" SELECT REALIZED_SALES_QUANTITIES.[Customer], Sum(REALIZED_SALES_QUANTITIES.[Sales_Quantity]) AS [Total Of Sales_Quantity] INTO TEST222 " & _
" FROM REALIZED_SALES_QUANTITIES " & _
" GROUP BY REALIZED_SALES_QUANTITIES.[Customer] " & _
" PIVOT REALIZED_SALES_QUANTITIES.[Reporting_Month]"
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub