Results 1 to 7 of 7
  1. #1
    alanfallow is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Location
    NE Scotland
    Posts
    31

    Datasheet Sum help Thanks


    I have a subform in datasheet view displayed within a parent form. I want to sum a column and display the result in the parent form. Has anybody out there done this? Have come across a few explanations but I keep getting #name?

    Thanks for any help.

  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,643
    You have a textbox in the subform form footer section with Sum(fieldname)?

    You have a textbox on main form that references the subform textbox?

    Post the expression from the main form textbox.

    Suggest naming the subform container different from the object it holds, like ctrDetails.

    Then reference the subform textbox like:

    =[ctrDetails].Form.[textboxname]
    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
    alanfallow is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Location
    NE Scotland
    Posts
    31
    Ok thanks think I get it. Will try and report back. :-)

  4. #4
    alanfallow is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Jan 2014
    Location
    NE Scotland
    Posts
    31
    Thank you that worked perfectly, I had wrong syntax which I got elsewhere. Goes to show stick to this forum. .
    Thanks again.

  5. #5
    alanfallow is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Jan 2014
    Location
    NE Scotland
    Posts
    31
    Just before this one is closed. I am trying to get a running total of the sum in the previous post. But keep getting an error.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Not easy in query and form. Requires nested subquery or DSum() expression.

    Textbox on report has RunningSum property.
    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.

  7. #7
    alanfallow is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Location
    NE Scotland
    Posts
    31
    Ah Ok sounds a bit beyond me. Maybe just do without until I get used to Access etc.
    Thanks again.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-18-2013, 09:14 PM
  2. Replies: 6
    Last Post: 11-21-2012, 05:10 PM
  3. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  4. Replies: 4
    Last Post: 05-04-2012, 03:41 PM
  5. Pop-up from Datasheet form
    By Tablerone in forum Forms
    Replies: 4
    Last Post: 10-02-2011, 03:36 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