Creating an Inventory System with Bills of Materials

%3CLINGO-SUB%20id%3D%22lingo-sub-2577459%22%20slang%3D%22en-US%22%3ECreating%20an%20Inventory%20System%20with%20Bills%20of%20Materials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2577459%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3EI'm%20new%20to%20Access%20and%20I'm%20developing%20a%20database%20for%20a%20small%20business%20that%20includes%20an%20Inventory%20table%2C%20where%20all%20parts%20are%20listed.%20I%20am%20hoping%20to%20create%20bills%20of%20materials%20for%20assembled%20products%20(finished%20goods)%2C%20which%20would%20include%20some%20parts%20from%20the%20Inventory%20table%20(parts%20included%20depend%20on%20the%20finished%20good).%20I%20want%20to%20have%20a%20front%20end%20form%20where%20the%20user%20simply%20selects%20which%20finished%20good%20has%20been%20ordered%2C%20with%20a%20%22complete%20work%20order%22%20function%20that%20will%20automatically%20remove%20the%20specified%20part%20quantities%20from%20the%20current%20stock%20in%20the%20main%20Inventory%20table.%20I%20am%20unsure%20on%20how%20I%20should%20approach%20this%2C%20through%20tables%2C%20update%20queries%2C%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20anyone%20has%20developed%20a%20similar%20system%2C%20or%20any%20ideas%20on%20how%20I%20can%20move%20forward.%20All%20suggestions%20and%20expertise%20are%20welcome!%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2577459%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2587280%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20an%20Inventory%20System%20with%20Bills%20of%20Materials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2587280%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1110509%22%20target%3D%22_blank%22%3E%40CDuest%3C%2FA%3E%26nbsp%3BKen%20Sheridan%20has%20a%3CA%20href%3D%22https%3A%2F%2Fonedrive.live.com%2F%3Fid%3D44CC60D7FEA42912%2521169%26amp%3Bcid%3D44CC60D7FEA42912%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%20demo%20relational%20database%20application%20called%20BoM%20(in%20BoM.zip)%20on%20his%20OneDrive%3C%2FA%3E.%20It%20demonstrates%20the%20proper%20way%20to%20create%20a%20Bill%20of%20Materials%20relational%20database%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2592933%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20an%20Inventory%20System%20with%20Bills%20of%20Materials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2592933%22%20slang%3D%22en-US%22%3EThank%20you!%3CBR%20%2F%3EDo%20you%20have%20any%20suggestions%20for%20logic%20behind%20removing%20an%20entire%20BOM%20from%20the%20main%20tblInventory%3F%20I%20believe%20an%20update%20query%20would%20work%20best%2C%20however%20I%20only%20have%20experience%20removing%20one%20part%20at%20a%20time%20based%20on%20a%20PartNumber%20and%20Quantity%20entered%20by%20a%20user.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2592968%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20an%20Inventory%20System%20with%20Bills%20of%20Materials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2592968%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1110509%22%20target%3D%22_blank%22%3E%40CDuest%3C%2FA%3E%26nbsp%3BBeing%20inexperienced%20with%20what%20you%20are%20asking%20about%2C%20I%20can't%20offer%20definitive%20suggestions.%3C%2FP%3E%3CP%3EHowever%2C%20in%20general%2C%20the%20technique%20is%20to%20start%20with%20delete%20queries%20that%20remove%20the%20records%20on%20the%20%22Many%22%20side%20a%20relationship%2C%20which%20is%20going%20to%20be%20the%20case%20with%20a%20BoM%20system.%20Then%2C%20when%20child%20records%20are%20deleted%2C%20you%20can%20run%20a%20delete%20query%20on%20the%20%22One%22%20side%20table(s)%20in%20turn.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi there,

I'm new to Access and I'm developing a database for a small business that includes an Inventory table, where all parts are listed. I am hoping to create bills of materials for assembled products (finished goods), which would include some parts from the Inventory table (parts included depend on the finished good). I want to have a front end form where the user simply selects which finished good has been ordered, with a "complete work order" function that will automatically remove the specified part quantities from the current stock in the main Inventory table. I am unsure on how I should approach this, through tables, update queries, etc. 

Please let me know if anyone has developed a similar system, or any ideas on how I can move forward. All suggestions and expertise are welcome!

Thanks in advance.

7 Replies

@CDuest Ken Sheridan has a demo relational database application called BoM (in BoM.zip) on his OneDrive. It demonstrates the proper way to create a Bill of Materials relational database application.

Thank you!
Do you have any suggestions for logic behind removing an entire BOM from the main tblInventory? I believe an update query would work best, however I only have experience removing one part at a time based on a PartNumber and Quantity entered by a user.

@CDuest Being inexperienced with what you are asking about, I can't offer definitive suggestions.

However, in general, the technique is to start with delete queries that remove the records on the "Many" side a relationship, which is going to be the case with a BoM system. Then, when child records are deleted, you can run a delete query on the "One" side table(s) in turn.

My apologies, I may have been unclear with the term "remove" in my last response.
I do not want to delete the records from the database. I have a main table (tblInventory) that has all parts listed with PartNumber being the primary key. Each PartNumber record has a field for CurrentStock on hand, which gets updated based on a users entry of parts coming in or out of the system (either added or subtracted from current stock).
So far, I have been using forms (frmAddInventory and frmRemoveInventory) where the user enters a PartNumber and Quantity, and queries update the current stock accordingly.
What I'm searching for now is a solution for removing an entire list of parts (with various quantities) from the tblInventory at once. I have now created a tblBOMs table, following Ken's example from above that has a list of PartNumbers and Quantity required. The information is all in the database, but as an Access beginner I'm unsure how to set up the "Criteria" and "Update To" fields in the update query, since I want to update multiple records at once. Perhaps there is a better way to do this, but so far I am only familiar with doing it through update queries.

@CDuest Ah, Thanks for the clarification. 

Actually, I would advise against that approach, which involves a calculated value for "CurrentStock".

In a traditional relational database application, one does NOT try to calculate and store values that are dependent on other values. The risks of going out of synch are too large.

When you want to see a current stock level, the recommended approach is to use a query that does the calculation based on "Total Received" and "Total Removed" instead of risking accuracy with frequent recalculations.

How does Ken Sheriden's relational database application handle that, btw?

Ah okay, I will look into changing "CurrentStock" to a calculation rather than a stored field.
Ken Sheriden's system is very basic compared to what I'm working with. It only has 7 parts/assemblies, whereas my system has over 350 parts/assemblies (and still counting). His methods provided some insight and sparked some new ideas, however the system itself seems like it would get confusing with a higher volume of parts.
Do you have any suggestions regarding removing multiple parts at once? Regardless of whether CurrentStock is stored or not, I will still need to record the transactions removing BOMs

@CDuest 

Again, I would expect that "removing" multiple parts at once would involve one or more delete queries, starting with the records to be removed from the child table(s). 

 

However, it's not quite clear to me what you mean by "...removing BoMs" in the first place, so it would require more details about what that means in the context of this application.