Results 1 to 3 of 3
  1. #1
    rts is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    34

    Database Design - Many to Many Issues

    Hello,

    I have been struggling this for a while now so hopefully someone with a little more expertise can help me.

    I've created an inventory database but I am having trouble getting the reports that I want out of my data. I have a Projects table with all pertinent info relating to each construction project my company is currently working on. I have an Inventory table with all pertinent inventory information. I have a MaterialTransfer table that has fields: MaterialTransferID, ProjectFrom, ProjectTo, and other pertinent date, time, and personnel information. I then have a Detail table that allows the user to enter the InventoryItem and Quantity. This has MaterialTransferID as a foreign key connecting the Detail table to the MaterialTransfer table.

    Unlike examples I've seen where inventory transactions work as items coming in or going out, I need to show items moving between the different projects. I want to be able to create a report that is grouped by Project. I want it to show all the Inventory Items that have come into that Project and all of the Inventory Items that have come out of that project as sums. So the ProjectNumber will be the header and there will be a line for each inventory item (not all of the inventory items, only the inventory that has come in or out of that particular project). Then there will be a sum in, a sum out, and a delta for each line. I can't get the "sum in" and "sum out" to show up correctly on the same query. If I have ProjectIn and ProjectOut fields in the MaterialTransfer table, the query of course wants to look at the record related to that MaterialTransfer only. I want it to single out the InventoryItem and ProjectNumber together then show how much came in and how much went out of the project so we can see when we lose inventory on a certain Project.



    Any suggestions on the best way to solve this problem would be greatly appreciated. I have a lot of many to many relationships going on and I've tried multiple ways to resolve. There are Projects and Inventory Items. I need to get a report out that will let me know at the end of the day, how much came in and out of each project. There are other reports necessary that need to show all of the information so the other tables and fields are necessary. I appreciate any insight.

    Thanks!!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Please post a jpg of your tables and relationships.

  3. #3
    rts is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    34
    Database tables and relationships attached. I'm afraid my the way I've linked my "MainCategory", "SubCategory", and "Inventory" tables may seem like an odd way to get to an InventoryID for an item. I needed to be able to have my form filter the results down as the user chooses Main Category, then Subcategory, then Description so that there is no way for him to mess up the data. I couldn't figure a better way to go about it. But the matter I'm working through now is what I've described above. I appreciate any help. Thanks!
    Click image for larger version. 

Name:	Inventory.jpg 
Views:	25 
Size:	64.3 KB 
ID:	9185

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form Design / Relationship Issues
    By brharrii in forum Forms
    Replies: 5
    Last Post: 06-23-2012, 11:37 PM
  2. Couple Design Issues
    By dpasanen in forum Forms
    Replies: 4
    Last Post: 03-29-2012, 07:47 AM
  3. My first database-design issues
    By rorybecerra in forum Access
    Replies: 8
    Last Post: 02-08-2012, 01:48 PM
  4. Issues with Subform Design
    By Scyclone in forum Forms
    Replies: 9
    Last Post: 10-20-2011, 07:14 AM
  5. Database Design/Report Issues
    By j2curtis64 in forum Access
    Replies: 15
    Last Post: 07-08-2011, 08:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums