Results 1 to 5 of 5
  1. #1
    leonhuynh2006 is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    9

    Automatically total(sum up) in main form based on subform

    Dear all bro,

    Presently, I am facing the problem that I can not update Total Price in the main form when entering value in subform. Please take a look at my file and help me. (Please open forms-->tb_order-->Total price(in yellow)(not the total))

    I am very appreciated for your helping

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What does Total Price(yellow) represent? Where does it get its value from?

  3. #3
    leonhuynh2006 is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    9
    it represents total price in subform. However, when I enter the value in the records of subform (I have used many ways :Afterupdate, on current,..), non of them works....

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What is the difference then between the calculation for Total and Total Price (yellow)?


    There is a calculation defined for Total on the Form and it is working.
    Total Price (yellow) is a value in your Table. No need to store a calculated value in your table.
    Given your record 1, what value do you think should be in Total Price(yellow), and how would the data get there??

  5. #5
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    First of all, create another query that will total the appropriate...

    Quote Originally Posted by leonhuynh2006 View Post
    Dear all bro,

    Presently, I am facing the problem that I can not update Total Price in the main form when entering va lue in subform. Please take a look at my file and help me. (Please open forms-->tb_order-->Total price(in yellow)(not the total))

    I am very appreciated for your helping
    column in your subform. Add an "afterupdate" that will transfer the total from this query to the appropriate field on the main form. You may need to have the total transferred by other events as well, to insure that you have a total displayed even if the subform isn't touched.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-11-2011, 10:02 AM
  2. Subform Combobox based on Main form combo box
    By accessmom in forum Forms
    Replies: 5
    Last Post: 02-21-2011, 07:02 AM
  3. Subform Filter based on Main Form Information
    By james.carpenter2 in forum Forms
    Replies: 0
    Last Post: 02-16-2011, 09:55 PM
  4. Replies: 1
    Last Post: 11-16-2010, 08:42 AM
  5. Replies: 1
    Last Post: 06-14-2010, 02:31 AM

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