Results 1 to 4 of 4
  1. #1
    hakha4 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    2

    Relational problem


    Hi!
    New to Access and can't get relations to work as expected. The aim is to have 3 (maybe more in the future) tables that are related 1:1 and 1 table related 1:N ( se pic below)
    I'll manage to relate mainTable and A ok with a primary key patID (counter) in mainTable and patID (integer) in TableA. But how to relate table B,C ... ? New counter? more than one field to relate??

    I've tried a number of combinations but can't get the hang of it. Could someone point me out how to accomplish this. I've googled back and forth but can't find an answer for my question.
    Any help appreciated
    Regards Håkan
    Attached Thumbnails Attached Thumbnails link_table.jpg  

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Each table must have their own PK field.
    If tables A, B & C will only ever have one record for each PatID there is no reason why you can't use PatID as the PK field for each
    Otherwise give each their own PK field and use PatID as the FK field used for linking

    The latter method MUST be used for table D

    Suggest you add referential integrity to the tables once you've finished sorting out the relationships
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Håkan,

    See the info in this link on Database Design and Planning info -videos and articles. You will find the tutorials in the article very helpful if you spend 30-45 minutes working through them. You will also find that starting with a clear description of what you are trying to do will greatly assist you in determining business rules and data relationships.
    Good luck with your project.

  4. #4
    hakha4 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    2
    Thank's to both of you for answer. I'll try sorting it out!
    Regards Håkan

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

Similar Threads

  1. Relational help
    By anastam in forum Access
    Replies: 2
    Last Post: 03-07-2016, 03:00 PM
  2. Replies: 2
    Last Post: 03-29-2014, 02:56 PM
  3. Replies: 4
    Last Post: 03-17-2014, 10:51 AM
  4. Problem linking two tables(relational)
    By Hairy in forum Access
    Replies: 14
    Last Post: 09-22-2012, 06:28 PM
  5. Relating 2 Tables - Relational Problem
    By jeng in forum Database Design
    Replies: 5
    Last Post: 04-01-2010, 09:25 PM

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