473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I am trying to build one form that I can add to sub forms etc I just dont get it

22
I have tried all sorts of ways,and they work up to a point,
I want 1 form that I can bring up a base recipe flavor(and can add new one to list) and a sub form lists all its ingredients and I can add to ,change,make new, and also bring up the variant flavor(and add new on to list) and a sub form that lists those Ingredients and I can add new, change add to and save the base to its table and the variant to and base recipe ID to a recipes table.The form I have now works but it saves the add too's to the next line so it make 2 entries into the recipes table from the variant.I don't mind if someone said to build a new form this way, as I have worked on this for weeks and am still not able to use it the way I need to. here are my tables

TBLBase Relationship with BaseRecipesTbl [BaseRecipeID]
[ID]Primary key Auto number,Yes(No Duplicates)[Name]Text

TBLBase Recipes Relationship with RecipesTBL[ID] and with IngredientsTbl [IngredientsID]and with Unit of measure TBL [ID]
[BRecipeID]autoNumber No PK,[Base RecipeID]Number,[IngredientsID]Number[UMID]Number[Quantity] Number

This is what I call a variant
RecipesIngredientsTBL relationship with RecipesTbl
[RecipeIngredientID] Autonumber PK [RecipeID] number [Ingredient] Number [Quantity]number [UM] number

Ingredientstbl relationship with RecipesTbl and with Base Recipestbl
[IngredientsID]PK Auto number,[Stock Codes Raw] Text[Ingredients]text[Sub Ingredients] memo [Additives] memo[Fat]text[SaturatedFat] text[Carbohydrates] text[Sugars] text[Sodium]text[Energy]text[Protein]text[Allergins] memo

Unit of measure TBL has a relationship with RecipeIngredientsTBL[UM] and base RecipesTbl [UMID]

Final and main one is the RecipesTBL it has relationships with all of them
[RecipeID]autonumber number PK [Flavour]Text[Type]text[Size]number[Base RecipeID]number

Phew and thats it :-) I can do my form if someone can change that. I am just at my wits end
my form has 2 combo boxs 1 for base recipe and one for variant and I can add to list on both, 2 text boxs for type and size and 1 subform baserecipe Ingredients that I can add to change or make new, and 1 sub form recipe ingredient that I can add to change make new as I said it saves the combo box(Variant) on one line and the subform changes/additions/new in the right place
Oct 19 '13 #1
4 1565
zmbd
5,501 Expert Mod 4TB
Let's see if we have the model correctly understood:
Starting with a basic cookbook concept.
You have a receipe for pancakes.
There is a the list of ingedents for this base receipe.
There is a set of instructions for this base receipe.
Under this receipe is an entry for variations,
Chocolate Chip:
This has the additional ingredents, substitutions, and further instructions.
Buttermilk:
same concept as the Chocolate Chip, just a variation on a theme.

Is this model correct in concept?
Oct 23 '13 #2
Rabbit
12,516 Expert Mod 8TB
If what you are trying to do is to store a large n-tier hierarchy where you don't know how many levels there will be, I suggest using a modified preorder tree traversal algorithm. An example can be found here: http://www.sitepoint.com/hierarchical-data-database-2/.

You will need to modify their modified version of course. They have only one root node. Whereas yours will have multiple root nodes. So you will need to store a tree identifier with each node. You can add, delete, edit, amd retrieve the tree information the same way as in the article with the exception of adding an existing recipe. When you add an existing recipe, you will be basically making a copy of that tree and putting it in the new tree.

This is not an easy project to tackle. If you choose to go down this path, it will be very difficult. The upside is that it is one of the fastest ways to store a multi-tiered hierarchy of data where the number of tiers is not known beforehand. It also avoids recursion.
Oct 23 '13 #3
Wornout
22
Sorry Rabbit I have no idea what you are talking about. But what I did was start again and my new form was working untill 2 seconds ago. I had the sub form x3 that were run off queries on my main form they are all editable. on my main form I have 4 combo boxs each one a master field to the 3 sub forms everything was fine even to the point that I had code to be able to add new names to the combo lists then I added the last table and now I can not change the combo boxs.
Oct 25 '13 #4
Rabbit
12,516 Expert Mod 8TB
Did you read the article I linked?

Why does this thread sound similar to your other one?
Oct 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dave | last post by:
After much general searching, a JS newbie asks: can anyone point me to where I can find out how to build a page (including form) using Javascript? The reason I'd want to do this is because the page...
2
by: jervin via AccessMonster.com | last post by:
Good Day, I want to get rid of the blank form everytime i open. I had a form link with a query and i wanted to prompt me sayin "data not found" instead of showing a blank form. i just dont know...
2
by: Jacob | last post by:
Is there a way to make a modeless dialog remain as a topmost window to your application, but not to all other applications. In other words, how can I keep a form(s) on top of my application all...
4
by: elime | last post by:
Hi all I load datas from an SQL server to a Datagrid. The datagrid columns are basically read only but one column is not -> the checkboxcolum. The user needs to be able to check or uncheck this...
7
by: GeorgeAtkins | last post by:
I want to create a web-based form or page that consists of a series of formatted questions and answers. The form will resemble an existing paper form. When the form is filled in, I want the user to...
8
by: Penny | last post by:
(Access 2003 Multiuser Split DB, Windows XP Pro) Hi All, I would really appreciate just some basic tips on how to make a Crosstab Form based on a Crosstab Query. The query always has the same...
2
by: bill | last post by:
I am building a web form dynamically using VB 2005. I add several textbox controls, radio button controls, checkbox list controls, etc. to a placehoder control on the page, and I want to add an...
18
by: jello_world | last post by:
I am a VB6 programmer and I know how to build console apps.. I just dont understand how to get my mind around WinForms; they just seem a lot more complex than VB6. Thanks -Charlie
3
by: mike2098 | last post by:
Hi all a bit new to this so here goes I am trying to achive the following quiries in sql total cost of the cars sold by each salesman in the past month I can only get it to show all the sales...
0
by: Neekos | last post by:
Hey guys, I'm trying to open a webpage from VB and fill in a form on that page with values from a database. I'm using VBA from Access 2003. This is where im at right now (not very far...im still a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.