0

Recipe as an ingredient entry for other recipes

Hello,

I am building a recipe manager and I am facing a challenge when a recipe can itself serves as an ingredient for another recipe (let's call it main recipe). I am quite a beginner in coding and I am requesting if someone can help me. The structure of my DB is: table Recipes, table Ingredients and a relationship table Ingredients per Recipe. In a simple case, I add ingredients in the recipe, and a total cost per portion is caluclated on the form. In some situations, an ingredient has to be prepared in advance by following a second recipe. My idea is to add a "tick" box "Base ingredient" on the main recipe form, which would create an entry in the Ingredient table with the name of this recipe and its cost per portion. Which code can be used for this action?

Thank you,

Jeff

3 replies

null
    • John_Halls
    • 3 yrs ago
    • Reported - view

    Hi Jeff

     

    I just want to check a few things:-

     

    1. Do you have a table for 'Stock I Make' aand nother for 'Stock I Buy' OR do you have a single table for Stock (regardless of whether it's made or bought).

    2. Can a single stock item only be made or bought, or can it be made on one occasion and bought on another occasion?

    3. What you are describing has 2 levels of production. Might there be more than 2 levels for some stock items?

     

    Thanks

     

    John

    • jeff_espinas
    • 3 yrs ago
    • Reported - view

    Hi John,

    It seems that my answer hasn't gone through... I have one unique table for the stock and it is currently filled with things I buy. I could have a second table if needed, I am flexible :)

    For simplicity, I won't have items which can be both made or bought and I would prefer to keep it at 2 levels of production.

    Thanks for your help,

    Jeff

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Thanks Jeff.

    One table is the way to go. I'm tied up today but will come back with some ideas as soon as I can.

    Regards John

Content aside

  • 3 yrs agoLast active
  • 3Replies
  • 328Views