Junior1544
Technical User
I'm having a problem with a cross tab query.
Any time I try to run the query i get an Invalid Bracketing of name error. I have the form it's referencing open and there's data in the fields... I just dono what to look at to fix it, and I don't know much about sql itself. Below is the sql statement pasted right from access.
Any idea's would be great. Thank you.
PARAMETERS [[Forms]![Product Reports]![Cust ID]] Text ( 255 ), [[Forms]![Product Reports]![Princ ID]] Text ( 255 ), [[Forms]![Product Reports]![Start Date]] DateTime, [[Forms]![Product Reports]![End Date]] DateTime;
TRANSFORM Sum([ORDER DETAILS].[Ship Quantity]) AS [SumOfShip Quantity]
SELECT ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num], Last([ORDER DETAILS].Description) AS LastOfDescription, Last([ORDER DETAILS].[Case Pack]) AS [LastOfCase Pack]
FROM ORDERS INNER JOIN [ORDER DETAILS] ON ORDERS.[Order Number] = [ORDER DETAILS].[Order Number]
WHERE (((ORDERS.[Cust ID]) Like [Forms]![Product Reports]![Cust ID] & "*") AND ((ORDERS.[Princ ID]) Like [Forms]![Product Reports]![Princ ID] & "*") AND ((ORDERS.[Ship Date]) Between [Forms]![Product Reports]![Start Date] And [Forms]![Product Reports]![End Date]) AND ((ORDERS.Void)=False) AND (([ORDER DETAILS].[Case Cost])>0))
GROUP BY ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num]
ORDER BY ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num]
PIVOT Format([Ship Date],"yyyy(mm)");
Life is change. To deny change is to deny life.
Any time I try to run the query i get an Invalid Bracketing of name error. I have the form it's referencing open and there's data in the fields... I just dono what to look at to fix it, and I don't know much about sql itself. Below is the sql statement pasted right from access.
Any idea's would be great. Thank you.
PARAMETERS [[Forms]![Product Reports]![Cust ID]] Text ( 255 ), [[Forms]![Product Reports]![Princ ID]] Text ( 255 ), [[Forms]![Product Reports]![Start Date]] DateTime, [[Forms]![Product Reports]![End Date]] DateTime;
TRANSFORM Sum([ORDER DETAILS].[Ship Quantity]) AS [SumOfShip Quantity]
SELECT ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num], Last([ORDER DETAILS].Description) AS LastOfDescription, Last([ORDER DETAILS].[Case Pack]) AS [LastOfCase Pack]
FROM ORDERS INNER JOIN [ORDER DETAILS] ON ORDERS.[Order Number] = [ORDER DETAILS].[Order Number]
WHERE (((ORDERS.[Cust ID]) Like [Forms]![Product Reports]![Cust ID] & "*") AND ((ORDERS.[Princ ID]) Like [Forms]![Product Reports]![Princ ID] & "*") AND ((ORDERS.[Ship Date]) Between [Forms]![Product Reports]![Start Date] And [Forms]![Product Reports]![End Date]) AND ((ORDERS.Void)=False) AND (([ORDER DETAILS].[Case Cost])>0))
GROUP BY ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num]
ORDER BY ORDERS.[Cust ID], ORDERS.[Princ ID], [ORDER DETAILS].[Item Num]
PIVOT Format([Ship Date],"yyyy(mm)");
Life is change. To deny change is to deny life.