Results 1 to 6 of 6
  1. #1
    Mark_435 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    3

    Linking tables to show primary key from main table

    Hi, I’m a database novice. I’m doing a survey on fishermen, the gear they use and their opinons about how things have changed over time. I’ve set up a main table with a primary key auto number per fisherman. I want that ID number to automatically come up in the subsequent tables about their vessels, opinons and gear. I’ve had a look at the forum and I’m sure there must be something in there, I just haven’t found it yet!



    I’ve linked the ID number in a “one to many” relationship (one to one would also work? ie. Only one address per fisherman) from the main table to the rest of them. My plan was that as I entered the data in the subsequent tables the fisherman ID number would be there automatically.
    Thanks,
    Mark

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Build forms that have a form/subform arrangement. This is basic Access functionality. Search Access Help on creating forms and subforms.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Mark_435 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    3
    Thanks, I wasn't very clear. I had already done them in forms and subforms and couldn't get the ID number to automatically come up in the subforms. I set the relationships as a one to many, perhaps I should have done a one to one?
    I'm going to try putting in a default value in the relevant subform to the main form and ID number I wish to use and see how that goes.
    Cheers,

    Mark

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Did you set the Master/Child links of the subform container control? This is what will synchronize the related records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Mark_435 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    3
    Yep, still wouldn't play the game. I've got it sorted now with the default value set for the linked master table. Thanks for the help.

    Mark

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Then something is wrong with table relationships or textbox is bound to wrong field or something. Record synchronization is purpose of the Master/Child links. I advise determining the cause of failure. If you to provide project for analysis, will look at.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  2. Linking a student table to multiple tables
    By iteachyou in forum Access
    Replies: 3
    Last Post: 02-06-2011, 05:53 PM
  3. Linking Subform Control to Main form
    By KWarzala in forum Forms
    Replies: 1
    Last Post: 03-13-2010, 08:32 PM
  4. Show two tables in single table
    By access in forum Forms
    Replies: 8
    Last Post: 06-11-2009, 11:57 AM
  5. Replies: 2
    Last Post: 04-11-2006, 08:40 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