Results 1 to 6 of 6
  1. #1
    PinkDuster's Avatar
    PinkDuster is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Aug 2017
    Location
    Cleveland area
    Posts
    65

    Updating Subtotals and Totals via Events in GotFocus and AfterUpdate leading to weird results

    Hello all,

    I've been working on forms for Orders and Order Details and have my order details subform updating with line totals, but when I try to add the order detail sub-total to the shipping and make an order total on the Orders form, there is weirdness going on. Not all the totals are updating like I thought they would. So the Order total does not have all the OrderDetails prices added into it. I have attached a cleaned up db for review.

    PinkDuster.zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    The expression is referencing the wrong control name. Should be:

    =[frmOrderDetailsSUB].[Form]![ItemTotal]+[OrderShippingAmt]

    Really should not be saving the order total to table. This should be calculated when needed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm guessing you have not read this link yet: http://access.mvps.org/access/lookupfields.htm

  4. #4
    PinkDuster's Avatar
    PinkDuster is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Aug 2017
    Location
    Cleveland area
    Posts
    65
    Thank you June7, I fixed the control name and am going to drop the idea of saving the order total to that table. I think it's more headaches than needed.

  5. #5
    PinkDuster's Avatar
    PinkDuster is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Aug 2017
    Location
    Cleveland area
    Posts
    65
    No, I hadn't. I see I'm in the Evil Zone and need to cease and desist going forward. Thank you for link.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by PinkDuster View Post
    No, I hadn't. I see I'm in the Evil Zone and need to cease and desist going forward. Thank you for link.
    It will save a ton of headaches later on.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-22-2015, 04:37 PM
  2. Calculating Totals and subtotals
    By sdc1234 in forum Queries
    Replies: 1
    Last Post: 07-24-2014, 07:21 AM
  3. Replies: 7
    Last Post: 08-02-2012, 07:31 AM
  4. Replies: 2
    Last Post: 11-04-2011, 09:14 AM
  5. AfterUpdate not updating
    By P5C768 in forum Programming
    Replies: 6
    Last Post: 06-10-2010, 02:31 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