Results 1 to 5 of 5
  1. #1
    tis_only_me is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2014
    Posts
    7

    Question Linking table columns within different tables as a master and slave

    Hi, I have a database with two tables. tbl_job_information contains all the contracts info etc. tbl_data contains all the relevant work data. The first table is restricted to certain personnel, whereas anyone has access to the second table. Both tables have a column called 'job no', in the first table it is a primary key, in the second just a field. I would like to make it impossible in the second table to change the data in the 'job no' column to anything that is not in the same column in the first table. It this possible within the tables themselves, or would I have to do it via coding and forms? Thanks in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In your relationships you should be able to check "Enforce referential integrity".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    A master form and sub-form should do this with no coding.

  4. #4
    tis_only_me is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2014
    Posts
    7
    Thank you pbaldy, I had set up the join correctly in the relationship but hadnt checked "Enfore referential integrity". It now does what I am after.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 01-02-2014, 02:07 PM
  2. Replies: 5
    Last Post: 08-22-2013, 04:32 PM
  3. Replies: 1
    Last Post: 08-19-2013, 10:59 AM
  4. Relating Multipe Tables With Similar Data To A Master Table
    By TotalChaos in forum Database Design
    Replies: 1
    Last Post: 04-13-2013, 12:57 AM
  5. Linking columns to ID number in multiple tables
    By oakeoffice in forum Access
    Replies: 8
    Last Post: 11-08-2012, 07:10 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