Thanks so much for your interest. My project is rather unusual. It's not something you can use an Access wizard to construct! I understand your apprehension that something might be awry with my design. Allow me to lay it out here
As unusual as my design might be, it's actually quite simple
tblProfiles is the heart of the database. This stores "birth/revision/death" info for all types of profiles from finished goods to packaging, formulas, ingredients, QA procedures, etc., etc. It has a total of 14 fields. 3 of these fields are required
txtProfileID (primary key
txtVersio
txtType (CG, BG, FA, FG, ED, etc.
Stick with me a minute and you'll see how this allows for a one-to-many relationship. In other words, I have one profile but many profile types
I've built frmProfilesTemplate which sources tblProflies. I simply use this form as a template and copy/paste/rename it for the type I want. For example, frmPKCorrugated for type CG; frmFinishedGoods for type FG; frmFormulas for type FA; frmPKBags for BG; etc
Then I build subforms into these forms that source other tables. For example, CG (corrugated) has tblPKCGPhysicalAttributes, tblPKCGMaterialAttributes, tblPKCGPerformanceAttributes, tblPKFinishingAttributes, tblePKCGAdditionalAttributes. These tables are in a one-to-one relationship with tblProfiles.txtProfileID. Same design holds true for all the various types
There you have it
Am I nuts or what
----- rpw wrote: ----
Wow, it sounds like you are tackling a very large, convoluted project - good for you! You've come to the right place for help. These ladies and gentlemen have helped me on several smaller problems.
Because I have more experience at asking for help than providing it, I'm going to avoid offering any solutions. But I'd also like to say that as I read this thread I'm confused by a couple of bits of information you've posted, and I'm going to guess that there may be some problems with table design. From what I've read here so far, it seems that only by seeing all of the tables (that relate to this one problem you are trying to solve) will anyone be able to help you.
So then maybe you do want to post your table structure (in the format I suggested) for Lynn Trapp, Jeff Boyce, and/or any other expert to look at. (maybe don't reply to this post, but to Lynn's with the info
In your description, you may also want to include the relationship between tables (just in case it's not obvious). For example
tblIngredient
IngrdID (PK
Produc
Descriptio
(other fields, etc....
Ingredients have a 1:M (one-to-many) to formula
tblFormul
FormulaID (PK)
IngrdID (FK
FormulaNam
(other fields, etc....
Again, I certainly don't wish to offend you by suggesting that there may be a design flaw. But I'm confused with your tblProfiles, and maybe by expressing my confusion you will see the need for providing some additional information. TblProfiles are profiles of what exactly? In there you want to relate Finished Goods to Corrugated, Corrugated to Bags, Eggs and Dairy to Finished Goods, etc. And your description leaves open the possibility that Finished Goods might even be related to Finished Goods. But I don't see any foreign keys listed in your description (like there is in the above example) so how are profiles to be related to one another
Another comment, in your reply to me you have various topics listed. On the surface, they sound like they are all well thought out and well defined subjects. Finished Goods sounds like it would be the logical junction table for grouping together ingredients, formulas, and packaging. But then your description of tblProfiles also seems to be a junction table for the same (and more) so, I must ask: what is the tblProfile REALLY for? As I scan through this thread for more info, your Profile table makes less and less sense to me. It seems as though each profile is a different rendition of a TYPE - So a corrugated might have many different versions, a formula might have many different versions, a finished good might have many different versions, and so on. But doesn't that really mean a new record in the appropriate table
(Continuing on my rant, sorry.) I'm also confused about your step number 4: "Upon selecting new related profiles also have a record generated for the related profile (two records for one relationship)."
I would assume that this means that when you are in the form that displays the Profiles and you create a new profile record, if there happens to be a new TYPE that is entered, have the record for the TYPE created for you?
Ok, new profile being created.... Type in version..."v123456-ABC"..... Type in Type...."Chicken".... Computer responds...."Hey! there ain't no chicken in the list, let me add that record! Boom - Done!"
But where is it supposed to be writing this record to - the formula table, the egg and dairy table, where?
This whole number 4 problem seems like it should be handled by two combo boxes and some NotIinList events, but it doesn't sound like the table structure is there to allow it to happen. Of course, no one here can know for sure unless you post the info....
Hope this helps you to get the help you need....
rpw
----- JohnLute wrote: -----
Thanks for "butting in" - I appreciate it and can use all the help I can get! You did a nice job clarifying. Actually, I'm in the food industry and my database includes and relates, ingredients, formulas, packaging, finished goods, suppliers, facilities, QA procedures, etc., etc.
Crazy I know but it's actually coming together!
----- rpw wrote: -----
sorry, i see you got it already - you can ignore this, I'll butt out now.....
----- rpw wrote: -----
Hi John,
If I may butt-in here and offer a suggestion/example on how to describe the details of your business to the people that can help you. I'll take the info you've already posted and add my own 'descriptions' (artistic embellishments) to it - you should post the actual details.
The business is Packaging. Package components are classified by Type. This table stores the various Types (aka Profiles)
tblProfiles
ProfileID (PK)
ProfileCode 'CG, BG, FG, FM
ProfileName 'corrugated, bag, etc...
Because one package can use more than one profile, the first profile can be related to any one or more of all of the other profiles, here is the junction table to store the relationships between profiles.
tblProfileAssociation
ProfileID1
ProfileID2
Reason 'explains the reason for the profile relationship...
I have one form for each of the different types because ....... each one is different (somehow). I then have a sub-form that lists all of the ProfileAssociations for the one Profile displayed on the main form.
Anyway, this might be more along the lines of what Jeff was asking for - the table structure plus a description to explain the table so that he might understand the data structure better.
hope this helps you to get help
rpw
----- JohnLute wrote: -----
Why?
Because - at the form level - we need to open a particular profile's form and:
1. See all of it's related profiles.
2. Select/delete related profiles.
3. Navigate to related profiles.
4. Upon selecting new related profiles also have a record generated for the related profile (two records for one relationship).
5. By deleting a related profile also delete the related profile's record.
I have 1-3 conquered. 4&5 are the issue.
Hope this helps!
----- Jeff Boyce wrote: -----
John
Again, your description covers 'how' (using sfrmProfilesAssociations, ...),
not 'what'.
If you turned off your PC and tried to describe the underlying business need
to someone, say, your mother, what terms would you use?
The problem I'm having (and may be only me) is that I cannot visualize what
your underlying data looks like. Most Access development starts with data
and proceeds to how it is visualized/displayed (i.e., forms and reports).
It would help me understand what you are trying to do if I better understand
why...