You're better off enforcing your rules by design. Try something like this -
Code:
tblRecipes
Recipe_ID PK
Description Text/Memo
tblIngrGroceries
IngrGroc_ID PK
Recipe_ID FK to Recipes
Grocery_ID FK to Groceries
AmountRequired Number
tblIngrSubrecipes
IngrSubRec_ID PK
Recipe_ID FK to Recipes
SubRecipe_ID FK to Recipes
AmountRequired Number
tblGroceries
Grocery_ID PK
Description Test/Memo
There is a loop from tblRecipes to itself, but that loop occurs in only one place, and is transparent to the database. You can't accidentally get two different answers by joining the same query in a different order, which is a major problem with your other designs.
For calculating the cost of all recipes, you first
(A) create tables to hold the grocery ingredient cost and subrecipe ingredient cost
Code:
tblIngrGrocCost
PK PK
IngrGroc_ID FK
IngrGrocCost Currency (The cost for the amount of this grocery ingredient in this recipe)
tblIngrSubCost
PK PK
IngrSubRec_ID FK
IngrSubCost Currency (The cost for the amount of this subrecipe ingredient in this recipe)
tblRecipeCost
Recipe_ID FK
RecipeCost Currency
(B) populate the grocery ingredient cost, and
(C) zero the subrecipe ingredient cost.
Then, you iteratively
(D) calculate recipe cost from ingredients, both groceries and subrecipes, and then
(E) calculate subrecipe cost from recipe cost.