Textbox not updating after calculation (1 Viewer)

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
I have a text box where you enter a value, and combo box where you select a value. Then I have another text box that show the calculated value for that row. Then below the calculated value, there is another text box that shows the sum of the calculated value per row. Say for example row 1 is 67 and row 2 is 70, then sum is 137.

The problem is that the text box is not updating automatically. If I closeout from the form, and reopen it. It will then show 137.
 

isladogs

MVP / VIP
Local time
Today, 16:38
Joined
Jan 14, 2017
Messages
18,246
Try using me.requery or possibly me.recalc
 

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
That's what I did in the sum field, but nothing happens.
 

isladogs

MVP / VIP
Local time
Today, 16:38
Joined
Jan 14, 2017
Messages
18,246
Not in Sum field.
Try putting it in Form_Current or the after update events for textbox and combo
 

June7

AWF VIP
Local time
Today, 07:38
Joined
Mar 9, 2014
Messages
5,486
Are you using VBA to save calculated value to field? Is Sum referencing that field? If so, then field must be populated and record committed before calculated value is available for Sum. Really should not save calculated data. Are you saving combobox value? Do calculation in form RecordSource query and reference that constructed field in Sum().
 
Last edited:

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
Yes I am, June :) Sum is referencing that field.
 

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
Do you have skype, June7? It would be easier to show whats going on skype then explaining on here.
 

June7

AWF VIP
Local time
Today, 07:38
Joined
Mar 9, 2014
Messages
5,486
As Colin suggested - also use code to then Requery form which will commit record.

If you want to provide db for analysis, follow instructions at bottom of my post.

No Skype.
 

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
Nothing is working, and I cant upload the file due to sensitive information.
 

June7

AWF VIP
Local time
Today, 07:38
Joined
Mar 9, 2014
Messages
5,486
Per instructions, suggest you make a copy and remove sensitive information.
 

TxStrob

Registered User.
Local time
Today, 08:38
Joined
Sep 23, 2019
Messages
44
What is the reason for not being able to do Skype?
 

June7

AWF VIP
Local time
Today, 07:38
Joined
Mar 9, 2014
Messages
5,486
I don't want to. I limit my participation and contribution to capabilities of forums.
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:38
Joined
Sep 21, 2011
Messages
14,338
What is the reason for not being able to do Skype?

Suuport by Skype does not help anyone else in the forum, which is what this site is about.?

See the link in my sig about randomizing data should you wish to post, however all you would need is the form and the tables to support it, so a quick export, structure only could produce a small DB to upload after you put some non private data in it to show the problem.?
 

Users who are viewing this thread

Top Bottom