Results 1 to 6 of 6

Thread: How to link???

  1. #1
    Join Date
    Jan 2008
    Posts
    8

    Unanswered: How to link???

    Hi everybody in this forum!
    I am a brandy new member.I get used to working with access 2000.I am building a programm of managing my personel.I have done 1 table in datasheet with full CV information of every members.Now I have built one more table about projects. Now I want to link 2 these tables to show the projects that every member has taken apart.The table"projects" include ID project,project name, begindate, enddate,project description.All I want is how to link these tables so that when I call one member, I can see all information about this one.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Where to start.

    Read up on database relationships. A link in a database is called a relationship.

    You need to figure out what kind of relationship you need, then structure your database accordingly, then create the relationship.

    HTH
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    to define a realtionship in Access you need...

    1) to have defined columns (fields) in both tables that are the same datatype. usually in a realtional table design the foreign key will be on a numeric integer/long datatype. if you use access in built autonumber datatype that is long integer.

    2) open up the realtionships window Tools | Relationships, all relevant tables to the diagram. click (and hold) the column in the table that is the 'parent', then whilst still holding drag the pointer to the child table, release the mouse button, and define the columns and detail appropriately. Generally I'd reccomend that you select "Enforce Relational Integrity", whether you choose to allow cascade deltes or updates is up to you.

    but then if you had looked at the help system you would have know all about this. It took a few iterations (starting off with relationship) to come up with this in the search tab
    "About relationships in an Access database"

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes, but if the OP needs a many-to-many relationship, it's not so simple.

    And considering it's personnel to projects... each person can work on many projects and each project can have many personnel working on it, I'd say a many to many is gonna be needed.

    If a M:M is required, you're gonna have to create a junction table, that contains the keys from both tables and create TWO relationships as healdem just explained.

    PERSONNEL 1-------M WORK M-------1 PROJECT
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Jan 2008
    Posts
    8
    Thank you for all helps from healdem and StarTrekker.I am trying to solve it!

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •