Results 1 to 6 of 6
  1. #1
    jriley is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    4

    auto id is not shoing up in all tables


    I have created several tables that share an auto id number, I have created the relationships exactly the same in every table, but for some reason the auto is (primary key) only shows in the first two related tables and not the others. When I go to enter data in the other related tables it gives an error saying my primary key field is null and when I open the table sure enough the auto id is not there. Any suggestions what might be causing this? I've never had this happen before.
    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    There is nothing in Access to automatically place a PK in a table just because you have defined a relationship. What did you do to get the first two tables to work?

  3. #3
    jriley is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    4
    I have always just allowed access to create the autoid (which I did in this case)and that id was in each related table. I am using the auto id as the PK in this case.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    The only object in Access that works in the background to insert Keys is the SubForm. If each table you have has an AutoNumber as a PrimaryKey, then each time you add a record to those tables it will create another PK for you. It will not however make it the same PK as another table. Your first post indicates to me that your other tables do not have the PK set as an AutoNumber.

  5. #5
    jriley is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    4
    Update, I did a repair and compact again, and this seemed fix the issue. I'd had already done this, but I gave it shot and did it again and it seems to have worked. I have absolutely no idea why. thanks!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    I'm still not sure of your configuration but glad you got it working.

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

Similar Threads

  1. Auto Populate a tables field
    By superjeff in forum Access
    Replies: 3
    Last Post: 09-12-2012, 12:25 PM
  2. Auto fill data (number) between tables
    By juli in forum Access
    Replies: 1
    Last Post: 08-31-2011, 10:41 PM
  3. Auto Record create across tables
    By b123 in forum Database Design
    Replies: 15
    Last Post: 10-02-2010, 01:36 AM
  4. Auto-updating fields in linked tables?
    By Leelers in forum Database Design
    Replies: 27
    Last Post: 01-08-2010, 06:23 PM
  5. auto update of two linked tables
    By colenzo in forum Access
    Replies: 4
    Last Post: 07-20-2009, 09:08 AM

Tags for this Thread

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