Results 1 to 4 of 4
  1. #1
    chriswrcg is online now Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Posts
    141

    Do related table fields auto populate

    If I have two tables that I have told to have a relationship using the auto number as the key point, when I enter a persons name into the associate name field on table one, does that associate name field on table 2 auto fill in the the name or do I have to type it in again?

  2. #2
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    4,070
    The names will not be populated in the second table but you shouldn't be duplicating data in two tables anyway.
    The primary key ID field should be used as a foreign key in the second table
    When you need to use the names with table 2, use a query linking both tables.

    Also suggest you look up referential integrity in Access help
    Colin (Mendip Data Systems) : Website, email
    If this has helped, please click the star button and leave a comment

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,885
    you can propagate data from one table to another if you have established relationships and employ cascading on the child field. I wouldn't call that "auto populate". It can also be done via form design if the form and underlying query is designed correctly and the query is updatable.

    EDIT - I'm not disregarding any advice about what should go into some other table. I tend to interpret the first post as being about adding the PK field (autonumber or not) to the related table, not duplicating data.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  4. #4
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    4,070
    I assumed Name wasn't the primary key field.
    If I'm wrong about that, then it's a bad choice.
    At some point there will be two different Anne Smith or similar to include in your table(s)

    Anyway as both micron and I have alluded to, referential integrity together with cascade update and possibly cascade delete may help you a lot

    Anyway I see the thread is now marked as solved.
    Colin (Mendip Data Systems) : Website, email
    If this has helped, please click the star button and leave a comment

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

Similar Threads

  1. Replies: 3
    Last Post: 09-05-2016, 10:56 AM
  2. Replies: 4
    Last Post: 04-04-2016, 08:11 AM
  3. Replies: 3
    Last Post: 07-24-2014, 01:22 PM
  4. Replies: 1
    Last Post: 06-24-2014, 01:31 PM
  5. Replies: 4
    Last Post: 01-20-2011, 10:05 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
  •  
Tech Forums: Microsoft Office Forums