Results 1 to 4 of 4

Thread: Linking tables

  1. #1
    Join Date
    Sep 2003
    Posts
    16

    Red face Unanswered: Linking tables

    Here is a real 101 question. I have tables that I need to link and I would like to have data in table A update if I change something in table B. For example table A is a survey and table B contains the response to a question (Yes, No, Don’t Know). I have entered data for a large group of responders and now want to change the “Don’t Know” answers to “UNK”. How do I join these tables so that all I will need to change is the data in table B and all the corresponding data in table A is updated? Thanks for your help and sorry about the basic nature of my question. I did a search on this first and didn’t find anything.

  2. #2
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122
    You never do that with databases

    You can have

    TABLE Questions
    F1: Q_ID
    F2:Question

    TABLE Answers
    F1: Q_ID
    F2: Answers

    The you create a One to Many Relationship.

    Try searching Google for: "Relational Database Design"+"Tutorials"
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    not sure that i agree with you _T_H.

    consider:

    tableWotAnswer
    waID, autonumber, PK
    waDesc, Text

    and add some records:
    1; "Yes"
    2; "No"
    3; "Don't Know"

    tableQuestions
    quID, autonumber, PK
    quText, text
    quAnswer, lookup on tableWotAnswer.waDesc, hide key field

    you can now change tableWotAnswer.waDesc for the third record to "Still thinking!" and this will reflect happily in tableQuestions.

    izy

  4. #4
    Join Date
    Sep 2003
    Posts
    16
    Hi izyrider,

    Thanks for the tip. I got it to work. I had to add a new lookup field and replicate the old data...but it works now. Thanks again.

    Thanks to Matt_T_hat as well. I don't think I was expressing myself very well but I do have the layout you described in your reply. Thanks for the tutorial suggestion as well.

    I love it when a plan comes together.

Posting Permissions

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