View Full Version : Newbie Needs help With Forms/Suforms/Combo Boxes


Rabufs
12-25-2001, 08:04 AM
First let me start by saying I am not a programmer and only now enough Access o be dangerous.

I am trying to set up a Cookbook (receipe) database for a fundraiser my wife is doing.

I need Receipe Name, Type (desert etc), Ingredients (as ingedient - quantity - unit)(sugar 1 cup), Directions, and Credit.

I have the credit and receipe type set up as combo boxes and the instructions as a memo field.

I have everything except the ingredient, quantity and unit piece(s). I would like to have these as pop-down boxes that can be added to (if the ingredient is not in the list). Also, as each element is independent (sugar 1 cup in one receipe could be sugar 3 Tbls in another) the elements need to be entered individually.

Where to start? I have gone round and round with subforms, combo boxes... and it escapes me.

Any help would be greatly appreciated! I'll even send you the database when done!

Pat Hartman
12-25-2001, 03:56 PM
Take a look at the Northwinds.mdb. The concept of items on an order is similar to ingredients of a recipe.

Rabufs
12-25-2001, 04:46 PM
Where would I find this Northwinds.mdb?

Rabufs
12-25-2001, 04:52 PM
Also - the first subform is not the problem - it is the other two elements that go along with an ingredient - ie - quantity and unit of measure

I do not what to have x number of entries for sugar for example with differnt quanties and units. So somehow these need to be linked as well.

David R
12-26-2001, 07:56 AM
Could you use a text box (well, number) and two combo boxes?

It would look something like this:
[#] [Dropdown: Cup(s), Tbl(s), tsp(s), etc] [Dropdown: Sugar, Flour, Salt, etc.]

And then look at the 'Not in List' event to add things to your existing list (which I would recommend storing in a separate table from your actual recipes). Look in the help or search these forums, there's lots on this very useful event.

Good luck! One side benefit of storing the number in its own field is you'll have the ability to create double or half recipes very easily.

HTH,
David R

Pat Hartman
12-26-2001, 01:42 PM
Rabufs,
Northwind.mdb is probably already installed on your PC. Search for it. If it is not there, you can install it from your Access installation CD. While you're at it, install the other samples as well. There are also several worthwhile sample databases, each covering a specific topic (forms, reports, etc.) available from the Microsoft download site.
http://support.microsoft.com/support/access/content/97downloads.asp?FR=0

To help you with the analogy, the [Products] table from Northwind is the equivalent of your Ingredient table. The [Orders] table is equivalent to your Recipe table. The [Order Details] table relates an Order to the Products being ordered and stores the quantity and cost for the item as it is connected to a particular order. In your case, you would need a new table that you can call RecipeIngredients to serve that purpose. This table will have a two field key - RecipeID and IngredientId. The additional fields would be UOM and quantity.

PS, It's Northwind.mdb - no s, sorry.

[This message has been edited by Pat Hartman (edited 12-26-2001).]