Results 1 to 5 of 5
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494

    Any way to get a total to show when filtering a query


    I have a query that just shows all the records in a table. It is used by the end user for filtering primarily. Now the user would like to see a total for the amount filtered.

    For example; the table is for repairs. The query just shows ALL the repairs. The user filters the client field to find all repairs for one client. He then wants to see what the total charges are for that query.

    I cant create a new field and sum the records because it is not a totals query. Is there any way to embed the query in a form and use the form portion to sum the filtered results?

  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,627
    Users should not work directly with tables and queries, just forms and reports. Forms and reports can be used to show aggregate calcs.

    However, a total row in table or query can be revealed by clicking the Totals button from ribbon. Select the desired aggregate function below appropriate field.
    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
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494
    Ok, that does not work the way I want it to. I also tried to create a form that was worksheet but when you do you cant use the header or footer of the form for any calculated fields.

    I did get it to work by creating the query and then creating a multiple items type of form and i can then create the calculated field in the footer. it does not have the standard filter ability built into the cells like a worksheet but you can click in the field and do the filter.

  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,627
    So you used a Continuous view form and arranged controls to look like Datasheet?

    If you must have Datasheet then it can be a subform on another form. Textbox on main form can reference textbox in subform footer (it is there even though it won't show).
    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.

  5. #5
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494
    Oh, yes, that is a better way. I created a worksheet form. added an unbound field to the page footer that did a sum calculation. Then added it as a subform on another form and referenced that subfield on the main form. works great and gives me the worksheet look and filter style I was looking for.

    Thank you June7 that is very helpful

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

Similar Threads

  1. Replies: 3
    Last Post: 05-24-2013, 04:39 PM
  2. Replies: 2
    Last Post: 05-23-2013, 08:29 AM
  3. Replies: 7
    Last Post: 05-06-2013, 02:39 PM
  4. Replies: 2
    Last Post: 01-02-2013, 02:43 PM
  5. Replies: 1
    Last Post: 03-15-2007, 03:38 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