Results 1 to 4 of 4
  1. #1
    DariusD is offline Novice
    Windows Vista Access 2000
    Join Date
    Dec 2012
    Posts
    28

    calculations

    I currently have an order item table that includes a quantity , price and a subtotal field. How do I get this calculations. I tried it two different way. first I tried building an expression in the subtotal field



    =[OrderItems]![Product_Quantity]*[OrderItems]![product_Price]

    This did not work. So I tried changing the Sub_total field in the OrderItems table to calculation then added the expression above, but got the following error
    Click image for larger version. 

Name:	from 8.jpg 
Views:	4 
Size:	17.0 KB 
ID:	10511
    here is the form, How do i generate sub total, and then a total field at the bottom of form


    Click image for larger version. 

Name:	form7.jpg 
Views:	5 
Size:	63.9 KB 
ID:	10512

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Firstly, calculations do not belong in tables. They are not stored values. They should be performed as needed in your form, query or report. Make sure that any control you use in a form to do the calculation is unbound to your tables. In your unbound control, create an expression

    Here is an example

    http://www.youtube.com/watch?v=oI_4xGIsmxA

  3. #3
    DariusD is offline Novice
    Windows Vista Access 2000
    Join Date
    Dec 2012
    Posts
    28
    OK I watched the video, and i noticed that he had a hourly rate, and hours, and then he had a column called service charge which was the total of the hourly rate, and hours. You instructed me that you should not have calculations in the table, but the video you pointed too did have calculation, Unless the person manually does the calculations and then inputs them into the table.. which doesn't make since to me. Not only that the video helps to sum up all the columns, but I need to know how to create the sub total.. which like in the video he had the following

    column1 column2 sub total
    hourly rate hours surcharge

    my table

    quantity cost sub total

    I need to sub total each item purchased and then at bottom have a total of the whole order.. this video helps me get a total of the whole order..How do i get the sub totals..?

    Click image for larger version. 

Name:	form 10 video example.jpg 
Views:	3 
Size:	79.6 KB 
ID:	10518

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I think that you are confused by what is a table and what is not a table. The calculation was performed in a form. It was a continuous form. Additionally, the calculation was not stored in any table as it was calculated in an unbound control and calculated each time the form was opened.

    We would need to do further analysis of your data to determine the best way to get sub totals. If you would like this, then upload a copy of your db with some sample data. Make sure to dummy up any confidential data. Run a compact and repair before uploading.

    I don't have the time or inclination to try and recreate your db from scratch so this step is necessary to solve your issue.

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

Similar Threads

  1. calculations??
    By richrit in forum Access
    Replies: 1
    Last Post: 04-11-2012, 05:06 PM
  2. Date Calculations
    By Polarbilly in forum Forms
    Replies: 2
    Last Post: 06-01-2011, 12:55 PM
  3. Calculations in a form
    By elmere in forum Forms
    Replies: 3
    Last Post: 04-27-2011, 04:11 PM
  4. Calculations in Query
    By jdhaldane in forum Queries
    Replies: 5
    Last Post: 12-10-2010, 05:57 AM
  5. time calculations
    By venu in forum Database Design
    Replies: 1
    Last Post: 10-23-2010, 12:36 PM

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