Results 1 to 5 of 5
  1. #1
    GregShah is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Canton, Ohio
    Posts
    60

    Value of Subtotal from Subform Changes

    I am calculating a subtotal from a series of number on a subform and then including the total on my form. When I initially enter my data in the sub form, the total number shown on the main form is not correct. However, once I close the form, open the table where the data resides and then reopen the form/subform, the subtotal is correct.

    The whole purpose of the subtotal is to validate the data entry into the subform so it is important that this subtotal be correctly displayed during the data entry if possible.



    Has anyone experienced this type of issue calculating a subtotal from a subform.

    Thanks,

    GregShah

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,528
    in the subform footer, put a field where =SUM([field])
    now your total will instantaneously update with the subform values.

    you can reference it from the main form too.

  3. #3
    GregShah is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Canton, Ohio
    Posts
    60
    I created a calculation and placed it into the footer of the subform. I referenced it properly in the main form and it does disply a number in the main form. The problem is that it does not update the total instantaneously. The total is wrong at first. Once I close the form and then reopen it, the field it then correct.

    The subtotal is not "current" for lack of a better term. However, once I reopen, the figure is accurate.

    Thanks,

    Greg

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,528
    mine is immediate.

    you could put a button to refreesh...
    [Forms]![frmDetail]![Child11].[Form]![txtSum].Requery

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    The total will recalculate after new subform record is committed to table. Record is committed when moving to another record, closing form, or running code to save.
    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.

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

Similar Threads

  1. Display subtotal from subform in main form
    By dougdrex in forum Forms
    Replies: 5
    Last Post: 11-12-2014, 03:25 PM
  2. Replies: 1
    Last Post: 08-05-2014, 03:36 AM
  3. Replies: 4
    Last Post: 02-04-2012, 12:51 PM
  4. Replies: 0
    Last Post: 07-15-2010, 12:32 PM
  5. Replies: 25
    Last Post: 03-31-2010, 11:10 PM

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