Results 1 to 4 of 4
  1. #1
    dweekley is offline Advanced Beginner
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2010
    Posts
    52

    Getting a Subtotal from columns in a Subform

    I have been youtubing and what not but can not seem to get a textbox to provide a sub total of a column in my subform. Either error or #name keep coming up and this is when I use the expression builder.



    I can however use dlookup to get the results from a query I created and this seems to be working fine. The issue is getting the query to re-query after a change has been made to a value or swtching to a different record.

    Click image for larger version. 

Name:	subform.jpg 
Views:	9 
Size:	182.5 KB 
ID:	28479

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Do you mean the columns that are calculated values? Aggregate functions can only reference fields, not controls. The Sum() expression must repeat the same calc, like: =Sum([Su Hrs] * [Su Cost])
    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
    dweekley is offline Advanced Beginner
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2010
    Posts
    52
    No. A sum of the Entry values themselves. No calculations. So basically getting a total of all the entries in SU Hrs, SU Cost, etc.

    I actually have it working that when the record (row) changes the subtotals update. Was hoping it can be done when a value in a textbox is changed. A little more immediate.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The changed value must be committed to table before the calc will update.

    Date is committed when: 1. closing table/query/form, 2. move to another record, 3 run code.
    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. Replies: 2
    Last Post: 11-07-2015, 09:48 AM
  2. Value of Subtotal from Subform Changes
    By GregShah in forum Forms
    Replies: 4
    Last Post: 08-12-2015, 11:40 AM
  3. Display subtotal from subform in main form
    By dougdrex in forum Forms
    Replies: 5
    Last Post: 11-12-2014, 03:25 PM
  4. Replies: 0
    Last Post: 07-15-2010, 12:32 PM
  5. Replies: 25
    Last Post: 03-31-2010, 11:10 PM

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