Results 1 to 3 of 3
  1. #1
    playgroundlegend is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    4

    Need to Calculate Sum In Text Box On Form Of Column In A Sub Form

    Good afternoon!

    I just typed up a detailed question here then firefox crashed, so Im gonna be brief on this second go around.

    Im creating a point of sale, and sales tracking system for a small lightly used storefront for internal employees.



    It works flawlessly and is pretty cool.

    Im almost done, I just need ot make it pretty, but I have 1 bare bones complication.

    I created a query that pulls up individual "Orders" within a transaction, then takes the price of the product, and multiplies it by the quantity then totals it in real time in the subform. Its pretty cool, and Im proud.

    However, I want 1 more thing.

    I want to have a tex box at the bottom of my form that calculates the SUM of the total column (currently named Expr1 ther ein the subform) for all the related records that pull up in the transaction so we know how much the total order costs all together.

    I tried creating the text box at the bottom and using this formula: =Sum([QueryOrderTotal]![Expr1]) .... but It comes up with an error. Anyone know how I can do this?



  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    in your subform, in the footer section, create a new textbox called say OrderTotal. In the controlsource put

    =sum([Expr1])

    if your subform is displayed as datasheet then no need to hide the control, otherwise hide it

    if your subform is displayed as datasheet, or you have hidden the control, then your text15 control controlsource should be

    =me.queryordertotal.form.ordertotal

    assuming your subform is called queryordertotal, otherwise change to what it is actually called

  3. #3
    playgroundlegend is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    4
    Thanks a TON! Huge help! that never crossed my mind to try

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

Similar Threads

  1. Replies: 2
    Last Post: 12-29-2015, 08:32 AM
  2. Replies: 3
    Last Post: 09-12-2014, 08:38 PM
  3. Calculate a column in a query
    By FormerJarHead in forum Queries
    Replies: 6
    Last Post: 10-03-2012, 11:57 AM
  4. Calculate Percentage based on previous column
    By VictoriaAlbert in forum Queries
    Replies: 1
    Last Post: 08-13-2011, 01:30 PM
  5. How to calculate a percentage on form
    By jrockusa in forum Forms
    Replies: 1
    Last Post: 03-31-2010, 01:53 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