H
hlam
The following SQL I copied and pasted from a query doesn't work. Can anyone
take a minute and look what I have done wrong?
Thanks!
str = "TRANSFORM Sum([tbl_Work_Table_Select_Rec].[Volume]) AS VolumeOfSum "
str = str & "SELECT [tbl_Work_Table_Select_Rec].[Op_ID],
[tbl_Work_Table_Select_Rec].[Job_Code], "
str = str & "Sum([tbl_Work_Table_Select_Rec].[Volume]) AS TotalOfVolume "
str = str & "FROM tbl_Work_Table_Select_Rec "
str = str & "GROUP BY [tbl_Work_Table_Select_Rec].[Op_ID], "
str = str & "[tbl_Work_Table_Select_Rec].[Job_Code] "
str = str & "PIVOT [tbl_Work_Table_Select_Rec].[Day];"
DoCmd.RunSQL str
take a minute and look what I have done wrong?
Thanks!
str = "TRANSFORM Sum([tbl_Work_Table_Select_Rec].[Volume]) AS VolumeOfSum "
str = str & "SELECT [tbl_Work_Table_Select_Rec].[Op_ID],
[tbl_Work_Table_Select_Rec].[Job_Code], "
str = str & "Sum([tbl_Work_Table_Select_Rec].[Volume]) AS TotalOfVolume "
str = str & "FROM tbl_Work_Table_Select_Rec "
str = str & "GROUP BY [tbl_Work_Table_Select_Rec].[Op_ID], "
str = str & "[tbl_Work_Table_Select_Rec].[Job_Code] "
str = str & "PIVOT [tbl_Work_Table_Select_Rec].[Day];"
DoCmd.RunSQL str