I get the following error and I can't figure where to remove/add the ")".
If I keep the ")" to complete he FROM, I get the error Extra ) in query expression 'Supplier) AS RawInfoUnion WHERE (((RawInfo UNION.Location)="NJ")) OR (((RawInUnion.Location)="CA"))'
and if I remove it I get missing operator
Code:
INSERT INTO AllDataTogether ( DateEnter )
SELECT RawInfoUNION.*, [enter date] AS DateEnter
FROM (SELECT Information.Item, Location, Supplier, Used, Sum(Nz([Raw Data]![Stock],0)) AS Stock FROM Information LEFT JOIN [Raw Data] ON Information.Item = [Raw Data].Item Group By Item, Location, Supplier
UNION SELECT [Information 2].Item, Location, Supplier, Sum(Nz([Raw Data 2]![Used],0)) AS Used, Sum(Nz([Raw Data 2]![Stock],0)) AS Stock FROM [Information 2] LEFT JOIN [Raw Data 2] ON [Information 2].Item = [Raw Data 2].Item) Group By Item, Location,Supplier) AS RawInfoUNION
WHERE (((RawInfoUNION.Location)="NJ") OR (((RawInfoUNION.Location)="CA"));