Results 1 to 5 of 5
  1. #1
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231

    Sum Specific Rows as Totals in Datasheet View


    I have a one to many relationship between a company name and the products they carry. I have a form which contains a subreport as a datasheet. Although I'm aware of the totaling of values in the datasheet, I only need values summed, but only pertinent to those values contained in that subreport.

    I may have 1,2,3 or more records related to that company. How do I display the sum of just those records in that datasheet subreport?

    Any help would be appreciated.

    CementCarver

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    A subreport or a subform acting as a report inside your form?

    Since you have Access 2010, why not include a subreport made to look like a datasheet and perform the sum inside the report design?

    Otherwise, you should be able to sum in the form from the subform if the column widths should always remain the same. You should be able to call the cells in the main form text box via [Forms]![YourMainFormNameHere]![YourSubformNameHere].[Form]![YourFieldNameHere]

  3. #3
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231
    TG_W,

    yes, my form displays a subreport/subform acting as a report inside my form. And yes again, my subform displays as a datasheet.

    So, are you saying that I am able to sum the values of a certain column just inside that datasheet?

    CementCarver

  4. #4
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    To clarify, subreports and subforms are two different objects, and Access 2010 allows you to insert either object into a form. In Access 2007, you can only insert a subform inside a form.

    You can create a report and perform the sum in the report, then have the report look like a datasheet, and insert into the main form.

    Otherwise (what it seems like without seeing the design of your database), you have a form inside of a form displaying as a datasheet, which means you need to perform the sum in the main form. Again, you could make the subform look like a datasheet and perform the sum in it just like you could with the report. But, I am not aware of any way to have a form (or subform in this case) perform sums while displaying in 'Datasheet' view, so you would need to perform the sum in the main form by adding a text box and lining it up under your column(s) you are summing.

  5. #5
    CementCarver's Avatar
    CementCarver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    231
    Thanks TG_W for your response and clarification. I was able to insert a subform into my form as a datasheet and linked the matching ID numbers between the two. Then I was able to use the datasheet SUM function to total the sq. footages listed.

    Issued solved......CementCarver

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

Similar Threads

  1. Replies: 7
    Last Post: 12-04-2014, 12:47 PM
  2. Replies: 1
    Last Post: 05-30-2013, 11:29 PM
  3. Totals showing across bottom of Datasheet view
    By Laurie B. in forum Access
    Replies: 8
    Last Post: 09-14-2011, 01:47 PM
  4. Totals in Datasheet View only shows COUNT
    By nypedestrian in forum Forms
    Replies: 6
    Last Post: 08-26-2011, 08:23 AM
  5. Subform, Totals, in Datasheet view
    By eww in forum Programming
    Replies: 1
    Last Post: 09-27-2010, 10:22 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