Calculated Field AfterUpdate Help in Form (1 Viewer)

VegMan

New member
Local time
Today, 06:50
Joined
Nov 19, 2018
Messages
6
Hi,

I have a form that has a calculated text box. It works out a sell price for the product and it is set to update after the Cost Price field is updated.

The calculation works great however it is changing the text box for every record in the form (In tabular view). Is there a way to only adjust the Sell Price in the text box relating to the specific record ?

I hope that makes sense. (Screenshot Attached)

Thanks !
 

Attachments

  • Screenshot.png
    Screenshot.png
    47.7 KB · Views: 52

June7

AWF VIP
Local time
Yesterday, 22:50
Joined
Mar 9, 2014
Messages
5,424
No. An unbound control will show the same value for every record. Unless the expression includes a dynamic factor, such as reference to another field that has variable data.

Post the expression.
 
Last edited:

VegMan

New member
Local time
Today, 06:50
Joined
Nov 19, 2018
Messages
6
Thanks for the reply -

Expression is:

Me.Text22 = Round(((((Me.Ex_Price * Me.Quantity) * 1.1) + 140) / 1.08) / Me.Quantity * 20) / 20
 

June7

AWF VIP
Local time
Yesterday, 22:50
Joined
Mar 9, 2014
Messages
5,424
Options:

1. bind control to field so the calculated result will show for only the current record

2. Put the expression in the textbox ControlSource property so it will dynamically calculate for each record. What you have is using only the values of the current record to set the value of the control with a calculated result. Then if you want to save the result to field, use VBA.
 

Users who are viewing this thread

Top Bottom