Results 1 to 4 of 4
  1. #1
    TheBrigg is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    5

    Update Table based on a Linked Table by Datasheet view


    I have created two tables that rely on the same primary key and linked them. I would like to be able to add a new value to one table, and have that linked column update in the linked table. Is this possible from the datasheet view? I know how to do it using an actual SQL Update Query.

    If possible, how do I go about doing this, or what would this be called?

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    If the two tables are linked on the primary keys (a 1-to-1 relationship), the only field that can be updated in both tables by changing it in one of them is the primary key, and for that you need to define a relationship between the two, and using the cascade update option. But note that cascade update only works in one direction, i.e. updating A will update B automatically, but not the other way around.

    Please post more information if this is not what you were asking.

    John

  3. #3
    TheBrigg is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    5
    Thank you for the reply John,

    I have the two tables with the primary key linked in one direction with cascade update. What this doesn't seem to do that I'm looking for, is populate new blank records in the second table when I add a new primary key value in the first table.

    To better explain, I have a list of models in Table A with some relevant data. In Table B, I need to reference the same models, but with separate data. When I add a new model in Table A, I need that model to populate in Table B, with no values in the corresponding data fields.

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    I think you will have to use VBA for that, unless there is a functionality in A2010 that I am unaware of (we don't have A2010 here at work yet).

    John

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

Similar Threads

  1. Form opens table in datasheet view
    By franklbl in forum Forms
    Replies: 9
    Last Post: 03-23-2011, 09:43 PM
  2. Replies: 1
    Last Post: 01-22-2011, 12:23 PM
  3. Replies: 0
    Last Post: 11-30-2010, 12:23 PM
  4. Replies: 3
    Last Post: 01-21-2010, 08:10 PM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 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