After many trial and errors run, I cannot seem to fix the syntax error. I am trying to concatenate some data and have been using Allen Browne (where you can find the code for ConcatRelated) and I got the SQL from another stackoverflow question but they had different data types.
The following is the SQL for the query that I am trying to run, which is surprisingly producing the correct results as well as this error which makes the query useless. (StmntNd is Text field and Assmt_Group is a Number field)
SELECT sub.[StmntNd], sub.[Assmt_Group], sub.[StmntDes], ConcatRelated("Num_Code", "tbl_Property", "[StmntNd] = '" & sub.[StmntNd] & "' AND [Assmt_Group] = " & sub.[Assmt_Group], "num_Code") AS concat_num_code
FROM (SELECT q.[StmntNd], q.[Assmt_Group], q.[StmntDes] FROM tbl_Property AS q GROUP BY q.[StmntNd], q.[Assmt_Group], q.[StmntDes]) AS sub
ORDER BY sub.StmntNd, sub.Assmt_Group;
This is the error that I am currently receiving:
Thank you very much for any help. No matter what combination of quotes and apostrophes I use, I seem to keep getting an error.