I had good success with all my other subforms using this function (after some great help from you guys) but now I have hit another block. This is my query:
SELECT [POCAllergies table].POCID, Concatenate("SELECT Allergies FROM Allergies Listing WHERE [POCAllergies table].AllergiesID = " & [Allergies Listing].AllergiesID) AS Allergies, [POCAllergies table].AllergiesID, [Allergies Listing].Alergies
FROM [POCAllergies table] INNER JOIN [Allergies Listing] ON [POCAllergies table].AllergiesID = [Allergies Listing].AllergiesID
GROUP BY [POCAllergies table].POCID, [POCAllergies table].AllergiesID, [Allergies Listing].Alergies
HAVING ((([POCAllergies table].POCID)=[Forms]![POC Form]![POCID]));
I am getting an error when I try to run that I don't understand:
"You tried to execute a query that does not include the secified expression "Concatenate("SELECT Allergies FROM Allergies Listing WHERE [POCAllergies table].AllergiesID = " & [Allergies Listing].AllergiesID)as part of an aggregate function."
Can you please help?
SELECT [POCAllergies table].POCID, Concatenate("SELECT Allergies FROM Allergies Listing WHERE [POCAllergies table].AllergiesID = " & [Allergies Listing].AllergiesID) AS Allergies, [POCAllergies table].AllergiesID, [Allergies Listing].Alergies
FROM [POCAllergies table] INNER JOIN [Allergies Listing] ON [POCAllergies table].AllergiesID = [Allergies Listing].AllergiesID
GROUP BY [POCAllergies table].POCID, [POCAllergies table].AllergiesID, [Allergies Listing].Alergies
HAVING ((([POCAllergies table].POCID)=[Forms]![POC Form]![POCID]));
I am getting an error when I try to run that I don't understand:
"You tried to execute a query that does not include the secified expression "Concatenate("SELECT Allergies FROM Allergies Listing WHERE [POCAllergies table].AllergiesID = " & [Allergies Listing].AllergiesID)as part of an aggregate function."
Can you please help?