Results 1 to 3 of 3
  1. #1
    s@s is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    14

    How to update subform dsum field from other subform


    Hi all,

    So i got a Customers form.

    inside it, i got a subform with services-provided.

    under the first subform, i have a second subform with service-payments "linked" with the first subform.

    one of the fields of services-provided is dsum on amounts from the service-payments

    what i would like to do is when i update a field in the second subform to recalculate the dsum field indide the first subform.

    i tried something like
    Code:
    [Forms]![frm_service-payments].txtPaymentsTotal.Requery
    inside the AfterUpdate() of the service-payments field but im getting an error 2465

    any ideas how to do this?

    thx!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    The syntax changes when the form is used as a subform:

    http://www.theaccessweb.com/forms/frm0031.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    s@s is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    14
    ah yes better now, it kinda works, need to fine tune it a bit as it behaves strange. when i update the value in the second subform, the dsum field gets blank. when i go to the next record then it recalculates correctly...

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

Similar Threads

  1. Replies: 4
    Last Post: 03-27-2018, 09:19 PM
  2. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  3. Update field in Subform
    By j2curtis64 in forum Forms
    Replies: 5
    Last Post: 04-06-2011, 07:12 PM
  4. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 PM
  5. update field from one subform to another
    By bluezidane in forum Programming
    Replies: 3
    Last Post: 08-20-2010, 07:54 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