Full Version: Text Box Formula Not Updating
UtterAccess Forums > Microsoft® Access > Access Forms
djleister
I have a textbox on a form which adds to subforms totals; however when the user changes a records which requeries the two subforms the textbox doesn't update. Can anyone suggest a code to do so?
Jeff B.
The form probably doesn't realize that there was a change. You'll need to remind it to recalculate. Check Access HELP for "Recalc" and/or "Repaint".
JonSmith
Textbox.requery or textbox.recalc
But either of them in the afterupdate event in the other two textboxes that the users will be changing.
djleister
I have tried this but it is not working.
I have a popup subdorm which allows the enduser to edit details including $'s, and I have the requery code for two other subforms which display subtotals; yet the mainform has a txtbox which adds both of the subform subtotal for a grand total....................................that is the txtbox which is not updating.
fkegley
What about placing the text box requery instruction in the form's On Current event?
Jeff B.
Are you saying that the .Requery (or .Repaint, or ...) command is in the sub-form? If so, how would the main form "know"?
djleister
Jeff,
I do have it currently on the subform after update as Me.Parent!txtant.Recalc; but honestly I have tried it everywhere and every rendition that I can think of but nothing works. The only way that it updates is when I reopen the form or I re-select the combo box contract number. I have even tried to insert a button which command a requery of the main form and that doesn't even do the trick, so I am strumped.
Jeff B.
Where do you have that .Recalc in the subform? Which event?
Have you added a Breakpoint and stepped through the code, to verify that the command is actually firing?
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.