Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    80

    Unanswered: Help - Total sums within queries and then reports?

    Yet another problem. I must be driving people crazy!

    I have the following query set up so that I can tally the total number of a certain dish has been ordered. For example, if I've had three different orders, all of which have contained the menu item Roast Chicken, and Order 1 ordered 2 r.chooks, Order 2 ordered 1, and Order 3 ordered 5 r. chooks, then I want the database to list it as follows:

    2 Roast Chicken
    1 Roast Chicken
    5 Roast Chicken

    TOTAL ORDERED: 8

    But I can't figure out how to specify this using totals/sums/etc as I'm not very bright when it comes to maths of any kind (I tended to doze off during lessons and then failed my last exam due to my tendency to be completely illogical).

    Here's a screen shot of my current query to give you an indication of how it is set up.

    Thanks for your help.

    Grace
    Attached Thumbnails Attached Thumbnails image.gif  
    Last edited by graceadair; 05-19-04 at 10:39.

  2. #2
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    On forms and reports you place an unbound text box and then for its data source. For tablular place it on the footer

    =Sum([FieldName])

    In a query there is a little thing on the toolbar that looks like a 3 around the wrong the way. I think it is called Omega or Sigma or some such name. Anyway, press it in and you will see "totals" appear under "table" in the query design and also Group By.

    Select Sum.

    The resulting query when opened produces a field with the total and a name like Sum of Orders

    Mike

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Smile

    Hello again graceadair,

    Check the attachment out below. I created a sample for you to play with. I did the summing for you on both the Form and the Report. But note on the summing for the items Across the form versus the summing function for the items listed Down the form. Oh, there are actually 2 reports. The one with the button I created from scratch, and the other I created with a Wizard.

    Hope I was able to make it easy for you, if need more help buzz me
    Bud
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •