Results 1 to 8 of 8
  1. #1
    LillMcGill is offline Dagny fan
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70

    Force update of unbound calculated control


    I have a subform that records payments made. In the header of this subform is an unbound text box (txtSumOfPayments) with the control source =SUM([PaymentAmount]). Ideally, as soon as the data entry person exits the record, the new sum is displayed. Sometimes this happens, but most of the time, the user will have to click back into the saved record in order to cause a recalc. I have tried Refresh, Requery, Recalc, Repaint... on a variety of events. What am I missing? I have something very similar on another form and it works, and I have similar in other databases. Any ideas?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Perhaps:
    Me.txtSumOfPayments.Requery
    or
    Me.txtSumOfPayments.Recalc
    in the forms After Update event.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    LillMcGill is offline Dagny fan
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70
    Thank you, but no joy. Maybe it has to do with it being version 2010 and a subform on a subform. I don't know. I discovered that clicking anywhere with the mouse updates, but nothing with the keyboard does. So I added a tiny Refresh button.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    The fact that the Expression is being used in the Control Source means that nothing should need to be done, once the Record is saved. The 'sometimes it does, sometimes it doesn't' makes me wonder if the Unbound Textbox has become corrupted.

    Although we usually think of Forms or entire Databases when we speak of corruption, individual Controls, such as Comboboxes, can and do become corrupted. The test and the fix are one and the same; deleting the Control then re-creating it! If it was corrupt, you've verified the fact and solved the problem! If not, you've only lost a minute or two!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    LillMcGill is offline Dagny fan
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70
    Great idea. I had already tried it, and also deleting the PaymentAmount textbox, but I tried it again now anyway. Still no change. Thanks though.

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    [PaymentAmount] isn't a calculated field, itself, is it?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    LillMcGill is offline Dagny fan
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70
    Nope; PaymentAmount is a textbox bound to a currency field in a table.

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    No more ideas, without actually laying my hands on the file! If you can save a copy in an earlier version file format (2007 would do, but 2003 would allow more people, including Bob, to open it) Zip it up and attach it to a post, I'd be happy to have a look at it and see if I can figure it out!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. How to force an update
    By bginhb in forum Forms
    Replies: 14
    Last Post: 12-04-2015, 07:00 AM
  2. Update unbound control in report based on if statement
    By echomania in forum Programming
    Replies: 6
    Last Post: 11-23-2012, 11:37 PM
  3. Formatting Unbound Control
    By SltPhx in forum Forms
    Replies: 12
    Last Post: 08-17-2011, 01:49 PM
  4. Replies: 1
    Last Post: 07-11-2011, 04:35 AM
  5. A way to force Access to update external file?
    By gkun in forum Import/Export Data
    Replies: 0
    Last Post: 10-27-2009, 06:11 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