Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38

    Unanswered: Calculating total query

    Hi i am trying to do a query where i can calcualte 20 item (quantity * unit price) and then calculate the total of the anwser.

    Is there anyway that anyone know how to do this as i have tried and not been succesful


    I am trying to do a report which calculates 3 different tables. However on the report i dont want any data except the final sum of the values i am trying to count.

    Does anyone have any ideas would be very greatful


    thank you
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Calculating total query

    Originally posted by kabir_hussein
    Hi i am trying to do a query where i can calcualte 20 item (quantity * unit price) and then calculate the total of the anwser.

    Is there anyway that anyone know how to do this as i have tried and not been succesful


    I am trying to do a report which calculates 3 different tables. However on the report i dont want any data except the final sum of the values i am trying to count.

    Does anyone have any ideas would be very greatful


    thank you
    Put a textbox in the report footer and set the ControlSource to something like:

    =Sum([Quantity] * [Price])

    And then either hide or remove the other sections ...

  3. #3
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    Hi i tried doing this but it resulted in having a couple of blank pages and then showing the sums


    Do you know if there is any way i can show the sum of three different tables in one report. these tables are not linked in any way

    many thanks
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by kabir_hussein
    Hi i tried doing this but it resulted in having a couple of blank pages and then showing the sums


    Do you know if there is any way i can show the sum of three different tables in one report. these tables are not linked in any way

    many thanks
    Yes ..... How is this to organized? How are you accessing the records? By a query in the RecordSource?

  5. #5
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    Hi

    Just wanted to say you were right regarding the report problem-sorry i was talking bout using the report header.

    Do you know if you can help me regarding my second problem about doing a report which includes four tables all of which are not related.

    Many many thanks

    i have attached a screenshot of the table i am trying to calculates

    regards
    Attached Thumbnails Attached Thumbnails screenshot.jpg  
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Yes.

    SELECT SUM(Table1.FieldName)+SUM(Table2.FieldName)+SUM(Ta ble3.FieldName)+SUM(Table4.FieldName) AS TotalSum FROM Table1, Table2, Table3, Table4;

  7. #7
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    Hi

    thank you for your reply - i think i explained my last reply wrong. what i meant was calculate the total of the four tables but show the total not add all of them togeather. If you know what i mean

    In a report i need to show the total of the first table, the total of second table, the total of third table and the total of the final fourth table.

    I was told by someone that i should do four different queries then join them togeather, I have been trying that but when i join them i seem to get over a 1000 records shown on screen. This is wrong. what could be wrong?

    Thank you for help so far
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by kabir_hussein
    Hi

    thank you for your reply - i think i explained my last reply wrong. what i meant was calculate the total of the four tables but show the total not add all of them togeather. If you know what i mean

    In a report i need to show the total of the first table, the total of second table, the total of third table and the total of the final fourth table.

    I was told by someone that i should do four different queries then join them togeather, I have been trying that but when i join them i seem to get over a 1000 records shown on screen. This is wrong. what could be wrong?

    Thank you for help so far
    Um ... Take out the PLUS signs ... So:

    SELECT SUM(Table1.FieldName) AS Sum1, SUM(Table2.FieldName) AS Sum2, SUM(Table3.FieldName) AS Sum3, SUM(Table4.FieldName) AS Sum4 FROM Table1, Table2, Table3, Table4;

  9. #9
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    Hi

    thanks for the reply however running the query makes the database crash.

    I have attached another screen shot to show exactly what i mean

    Once again many many thanks for all your help, really apreciate it

    I am trying to do a query where all i do is type is the project name and as it is linked to all the other tables one way or another. It shows the final sum of the project title typed in.

    Hope this helps
    Attached Thumbnails Attached Thumbnails screenshot1.jpg  
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

Posting Permissions

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