So I am now running into trouble trying to use Allen Browne's ConcatRelated function.
qry1 is used to pull out the records I want to report via criteria filter
qry2 is used to create the Start and End Ranges using qry1 results
qry3 is used to join each Range from qry2 with their identifying records from qry1
I am now trying to use the ConcatRelated function in a separate query to concatenate all ranges and keep them joined with their identifying records so that my report can be based solely off this query.
The new query has the following SQL code currently:
Code:
SELECT [qry1].InspectorID, [qry1].InspectionDate, [qry1].MunicipalID, [qry1].SectionID, ConcatRelated("Range","qry3","MunicipalID = "" & [MunicipalID] & "" AND SectionID = "" & [SectionID] & """) AS Expr1
FROM [qry1];
Upon execution, I get an "Error 3131: Syntax error in FROM clause."
When I temporarily commented out the module's On Error statement, the debugger highlights this line:
Code:
Set rs = DBEngine(0)(0).OpenRecordset(strSql, dbOpenDynaset)
I'm not entirely sure if it's my SQL syntax that's wrong or if I am using the function incorrectly.