Results 1 to 4 of 4
  1. #1
    Catherine is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    2

    One to many relationship problem

    I am a beginner access user and am trying to develop a db for all of our equipment as well as all of our spare parts for that equipment.



    I have attached 2 files with screen shots of the relationships page (attach 1). I am trying to create a relationship from the tblparts PartsID to the tblequipmentlist Parts. I made sure the properties on the Parts field are set to a number. I also created it as a lookup to the tblparts table. When I try and create the relationship, a new box appears named tblparts 1 (attach 2). What is that? And it also creates it as a 1 - 1 relationship.
    Each piece of equipment has multiple spare parts. Am I setting this up backwards?

    Ultimately when I open the frmequip, I would like the list of parts to show for that particular piece of equipment. Similarly to when I open my frmManufacturer it shows all of that manufacturers equipment (attach 3)

    This is another question:

    The maintenance guys that are responsible for getting me the data to populate this db are in the field. In order to keep from getting 100 pieces of scrap paper with missing details, I designed the "forms" for them to use to give me what I need in the order I need it. Well, as I have learned, you can't print the forms in access. How do I take one of my blank forms and export it so I can give it to them to use when they collect the equipment/ part information? I tried exporting it to Word - that didn't work. I tried creating a report, but all that gives me is a data table populated with all the pieces of equipment. All I want is a blank form in each category so I get the "all" information in the correct order so it is easier to enter it into the db.

    Would appreciate any help you can give.

    Catherine

  2. #2
    Guus2005's Avatar
    Guus2005 is offline Carbon based thingy
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2010
    Location
    the netherlands
    Posts
    42
    Your database design is not completely accurate.

    There is equipment which is the end product and there are parts. Equipment consists of parts and a part can have parts.
    Your design does not reflect this.

    My suggestion: Create two new tables: EquipmentPart and PartPart
    Equipment has a one-to-many relationship with EquipmentPart
    EquipmentPart has a many-to-many relationship with Part
    Part has a many-to-many relationship with PartPart

    EquipmentPart has two fields EquipmentId and PartId
    PartPart has two fields ParentId and ChildId which both are PartId's

    With this setup you can do anything you want.

    HTH

  3. #3
    Catherine is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    2
    Thank you. I am about to create the new tables.

    What is the primary key in the EquipmentPart table and the PartPart table?

  4. #4
    Guus2005's Avatar
    Guus2005 is offline Carbon based thingy
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2010
    Location
    the netherlands
    Posts
    42
    EquipmentPart has two fields EquipmentId and PartId, both FK, combined PK

    PartPart has two fields ParentId and ChildId which both are PartId's, both FK, combined PK

    They build the relation between equipment and part en parent and child parts. Enjoy!

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

Similar Threads

  1. Table/Relationship Problem?
    By WallbrownF in forum Access
    Replies: 7
    Last Post: 05-26-2011, 12:22 PM
  2. Relationship Problem?
    By j3lena in forum Database Design
    Replies: 1
    Last Post: 01-14-2011, 05:27 PM
  3. Relationship Problem
    By hawzmolly in forum Database Design
    Replies: 4
    Last Post: 07-18-2009, 05:39 PM
  4. Relationship problem?
    By amangill1984 in forum Access
    Replies: 0
    Last Post: 03-04-2009, 08:57 AM
  5. Normalisation and Relationship Problem
    By dromorkid in forum Database Design
    Replies: 3
    Last Post: 02-05-2009, 04:04 PM

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