Results 1 to 3 of 3
  1. #1
    webfactoryuk is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2011
    Posts
    25

    Help designing a table

    Hi,

    Im creating a warehouse racking inspection reporting system (mouthful I know!) and I need to have a combo box that is dependant on a previous combo box.

    Looked through some guides and I think I can work that part out but its the table Im not sure about!

    Each racking component will have a list of defect and rather than have a massive list I would like to filter it based on the component selected in the combo box above.

    Do I need to use multiple tables or can I have the columns as

    ID - Component - Component Defect


    The reason I ask is one component could have the same defect as others but then it will have ones original to it aswell.



    Aslong as the component field is different, does it matter if some of the text in the defect column is repeated?

    For instance

    ID - Comp - Defect

    1 - Beam - Bent
    2 - Beam - Loose
    3 - Beam - Buckled

    4 - Bolt - Bent
    5 - Bolt - Missing


    So ID 2 and 4 have differents comps but the same defect.

    Will it still work for doing something like this

    http://www.datapigtechnologies.com/f...combobox2.html


    Thanks in advance and sorry for being a noob!!

  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,746
    The tutorial at datapig is excellent. The topic re comboboxes is Cascading Combos, and samples/explanations can be found by Googling that phrase.

    What have you got for tables for your database? That may be the key to some of what you're doing/asking.

    Perhaps you could describe your environment a little more to help us picture what a
    warehouse racking inspection system is.

    If it is Components and Defects, then maybe there are 3 tables involved.

    Components and Defects, and a 3rd table

    ComponentHasDefect which has the ComponentId and the DefectId
    and could have Multiple Defects per Component

    ComponentHasDefect would be a Junction table to resolve a
    many-to-many relationship between Components and defects.

    Anyway, just a few thoughts that are intended to be helpful and constructive.

  3. #3
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    oops! I see orange responded first...

    The reason I ask is one component could have the same defect as others but then it will have ones original to it aswell.
    The above statement implies that a component can have many defects which describes a one-to-many relationship which requires a separate table. Since a defect can apply to more than one component you have another one-to-many relationship. When you have 2 one-to-many relationships between the same two tables you need a junction table.

    tblComponents (beam, bolt etc.)
    -pkComponentID primary key, autonumber
    -txtComponent

    tblDefects (a table to hold all possible defects: Bent, loose, buckled etc.)
    -pkDefectID primary key, autonumber
    -txtDefectName

    tblComponentDefects
    -pkCompDefectID primary key autonumber
    -fkComponentID foreign key to tblComponents
    -fkDefectID foreign key to tblDefects

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

Similar Threads

  1. Designing Reports
    By jlclark4 in forum Reports
    Replies: 3
    Last Post: 02-28-2011, 01:46 PM
  2. Help with designing database
    By nimalp in forum Access
    Replies: 6
    Last Post: 09-15-2010, 10:34 AM
  3. Designing Load Database
    By salisbut in forum Database Design
    Replies: 5
    Last Post: 08-02-2010, 10:41 AM
  4. Designing Form
    By Kookai in forum Forms
    Replies: 0
    Last Post: 07-30-2010, 11:03 AM
  5. Help Designing Tables
    By sakthivels in forum Database Design
    Replies: 7
    Last Post: 06-09-2009, 07:48 AM

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