I'm using an Allen Brown concatenate related records code from Allen Browne (http://allenbrowne.com/func-concat.html).
The code works fine when I have only one criterion. The code is like this:
Where Allergen and recipeID are text fields in query Q_Recipe_Allerg en.
Txt_RecipeID is the text box name. ConvWTA is a number field that data sorting is based on.
When I tried to add the second criterion RecipeVersion, I cannot get the syntax right. The closest (not working) one I can get is as below. I got error message “Error 3061: Too few parameters. Expect1.”
I think I got confused with the quotation mark. What should the correct syntax be?
Thanks,
Joe
The code works fine when I have only one criterion. The code is like this:
Code:
=ConcatRelated("[Allergen]","[Q_Recipe_Allergen]","[recipeID]= """ & [Txt_RecipeID] & """","[ConvWTA]" & "DESC")
Txt_RecipeID is the text box name. ConvWTA is a number field that data sorting is based on.
When I tried to add the second criterion RecipeVersion, I cannot get the syntax right. The closest (not working) one I can get is as below. I got error message “Error 3061: Too few parameters. Expect1.”
Code:
=ConcatRelated("[Allergen]","[Q_Recipe_Allergen]","[recipeID]= """ & [Txt_RecipeID] & """" & "And [RecipeVersion]=""" & [txtRecipeVer] & """","[ConvWTA]" & "DESC")
Thanks,
Joe
Comment