Concatenate Related Help

DerekDaNoob

Registered User.
Local time
Tomorrow, 00:46
Joined
Dec 16, 2014
Messages
22
Im using Alllen Browne Concatenate related module.

I have had it working previous i and just a little stuck on this one

Here is my code i am trying to use
Code:
Me.IngredientList = "INGEDIENT LIST:" & ConcatRelated("[Meal - SumOfIngredientsQ]![IngredientName]", " [Meal - SumOfIngredientsQ]", " [Meal - SumOfIngredientsQ]![MealID] = """ & [MealID] & """")
Any ideas
 
You don't tell what problem you've:
If MealID is text:
Code:
 "[Meal - SumOfIngredientsQ]![MealID] = [B][COLOR=Red]'[/COLOR][/B]" & [MealID] & [B][COLOR=Red]"'"[/COLOR][/B])
If Number:
Code:
 "[Meal - SumOfIngredientsQ]![MealID] = [B][COLOR=Red][/COLOR][/B]" & [MealID][B][COLOR=Red][/COLOR][/B])
 
Thanks for the reply

Sorry about that, the error i am getting is
"Error 3062: Too few parameters Expected 2."

MealID is a number
 
Could you post your database with some sample data?
Else show the code in "ConcatRelated" + some data.
When number then you need to use:
Code:
 "[Meal - SumOfIngredientsQ]![MealID] = " & [MealID])
 
Can you post the database here, I don't have an account at Google.
Scroll a little down when you do a replay, then you'll see a button, "Manage Attachment".
 

Attachments

  • open error.png
    open error.png
    30.7 KB · Views: 113
You've wrong reference to the form in your queries, some is [form]![mealf]![Mealid], but correct is: [Forms]![mealf]![Mealid]
Then you don't follow the advices you get, (maybe you know better as we do) :mad:
You've "[Meal - SumOfIngredientsQ]![MealID] = "" & [MealID] & """ that is wrong.
Correct is still: "[Meal - SumOfIngredientsQ]![MealID] = " & [MealID]
But all in all it doesn't help you, then the overall problem is that you've querie(s) with references to a form and you try to use it together with a recordset, you can't do that.
I've made a workaround for you that works.

Only for information, if you do a "Compact & Repair" to the database, it reduce size, so you could have posted direct in the forum as I've done.
 

Attachments

Thank you JHB for your help. i had sent you an older copy, i did try
"[Meal - SumOfIngredientsQ]![MealID] = " & [MealID]

and many other ways

I will take all the advice i can get. (it was also after 2am sorry if i didnt make any sense )

Thank for for letting me know about
Only for information, if you do a "Compact & Repair" to the database, it reduce size, so you could have posted direct in the forum as I've done.
I had no idea

I am very grateful i have been stuck on this issue for a while.
 

Users who are viewing this thread

Back
Top Bottom