Results 1 to 5 of 5
  1. #1
    mantooth29 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    21

    Data Macro(After Update): For each on field a few tables removed

    I need to create an AfterUpdate action that modifies records in another table.

    However, I am not having success and I think its because the table I need to modify is on the other side of a junction table.

    So AfterUpdate [tbl_Groups] needs to modify records in [tbl_Commitments] which both have foreign keys in [tbl_Reviews]

    Is this possible with data macros?

    I have pasted a picture of my macro if that helps visualize what I want to do. Right now no records are being modified after an update.



    Click image for larger version. 

Name:	Untitled.png 
Views:	21 
Size:	34.4 KB 
ID:	14993

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The only ways I know to update field in another table is with an UPDATE query or VBA opening a recordset of the other table and editing the recordset.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mantooth29 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    21
    Quote Originally Posted by June7 View Post
    The only ways I know to update field in another table is with an UPDATE query or VBA opening a recordset of the other table and editing the recordset.
    Ah ok. I was trying to work off some examples from here

    http://msdn.microsoft.com/en-us/libr...ice.14%29.aspx

    but I see that they were editing records in the same table.

    Do you know if I could trap the Record ID from the table with a trigger on it, then execute an update query with that key as a parameter?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I think not but really need to know more about what you are trying to do.

    Why do you have to do this edit?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mantooth29 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    21
    Thanks for following up. It does not seem like I can accomplish what I wanted with a trigger, so I just built a query on the front end and will have it execute with Form Events. Thanks again!

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

Similar Threads

  1. Replies: 1
    Last Post: 08-13-2013, 02:09 PM
  2. Entering Data to update all tables.
    By mike02 in forum Forms
    Replies: 19
    Last Post: 06-06-2013, 09:06 AM
  3. Form field to update two tables?
    By LMA in forum Forms
    Replies: 4
    Last Post: 05-03-2013, 05:06 PM
  4. Replies: 5
    Last Post: 12-30-2011, 01:01 AM
  5. Update data from two tables
    By peshonzi in forum Queries
    Replies: 6
    Last Post: 07-04-2011, 12:03 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