I would like to create a resource of recipies in order that I can use some
yes/no boxes or input boxes to say what ingredients I have in my cupboard and
follow the flow chart idea of ending up with a list of recipies which would
use up my ingredients.
I know a bit of VB, am learning java but know access quite well so I think
this is my safest route to creating something that works. I presume I would
have tables of ingredients (pork, poultry, veb, seasoning...) and then a form
to input what each recipie contains and the amounts of each ingredient.
My question is how would I input what ingredients I actually have, and then
how do I get a query to return results which only contain the ingredients I
have input? I could use a massive form with check boxes but that might be far
too large and user unfriendly. If recipies which use ginger only have beef
then there's no point asking a person who doesn't have the beef whether they
have ginger.
I hope this makes sense and thanks for any advice.
Stuart - 06 Jan 2005 17:37 GMT
Hi Clare,
I've read your question message over and over for 10 minutes and I can't
paint the picture of the table structure your defining. However, I think your
core question is about SQL and the existance or non-existance of data in a
field. If that is the case, a test for: "WHERE SomeIngredient <> Null" should
be sufficiant.
> I would like to create a resource of recipies in order that I can use some
> yes/no boxes or input boxes to say what ingredients I have in my cupboard and
[quoted text clipped - 14 lines]
>
> I hope this makes sense and thanks for any advice.
Tim Ferguson - 07 Jan 2005 17:42 GMT
> a test for: "WHERE SomeIngredient <> Null" should
> be sufficient.
Or, rather, WHERE SomeIngredient IS NOT NULL
The expression Something <> NULL always returns NULL regardless of the
value (or non-value) of Something. NULL is neither equal-to or unequal-to
anything, not even another NULL.
B Wishes
Tim F
John Nurick - 06 Jan 2005 21:39 GMT
Hi Clare,
I suppose the general idea could be something like this (* indicates a
field is, or is in, the table's primary key):
tblIngredients
IngredientName*
other fields
tblInventory
IngredientName* - FK
DatePurchased*
UseByDate
Unit (e.g. g, ml)
QuantityOnHand
other fields?
tblRecipe
RecipeName*
Description
Instructions
other fields
tblRecipeIngredients
RecipeName* - FK
IngredientName* - FK
Quantity
With a structure along these lines it would be possible to write a query
that returns every recipe that can be made from the ingredients on hand.
>I would like to create a resource of recipies in order that I can use some
>yes/no boxes or input boxes to say what ingredients I have in my cupboard and
[quoted text clipped - 14 lines]
>
>I hope this makes sense and thanks for any advice.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.