I have created the following query shown below which runs fine:
However, If try and modify the query to add a field or take a field out I get the message "Invalid Bracketing of name SELECT EmployeeTbl.[First Name'."
Can someone tell me why I am getting this message.
SELECT *
FROM [SELECT EmployeesTbl.[First Name], EmployeesTbl.[Last Name], AdvancesTble.date, AdvancesTble.Location, AdvancesTble.Advance, Sum(IIf(IsNull([pmt]),"0",[pmt])) AS SumOfPmts, ([AdvancesTble].[Advance]-[SumOfPmts]) AS Balance, AdvancesTble.Notes
FROM EmployeesTbl INNER JOIN (AdvancesTble LEFT JOIN AppliedPmtsTbl ON AdvancesTble.Transaction_ID = AppliedPmtsTbl.Transaction) ON EmployeesTbl.ID = AdvancesTble.EmployeeLkp
GROUP BY EmployeesTbl.[First Name], EmployeesTbl.[Last Name], AdvancesTble.date, AdvancesTble.Location, AdvancesTble.Advance, AdvancesTble.Notes;
]. AS [PAYMENTS SUMMARY]
WHERE ((([PAYMENTS SUMMARY].Balance)<>0));