Results 1 to 4 of 4
  1. #1
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142

    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 MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    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, 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
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    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.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    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, 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

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
  •  
Other Forums: Microsoft Office Forums