Which event occurs when a textbox is changed programmatically?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a textbox (TB1) which is calculated as a result of two other
textboxes (TB2, TB3).

I want to make a new calculation and change the value of a fourth textbox
(TB4) as a result of the change in TB1.

I tried OnChange, AfterUpdate and OnDirty but none of these events occur
when the value of the textbox is changed programmatically.

Any comments?
Thanks - Kamil
 
Kamil Dursun said:
Hello,

I have a textbox (TB1) which is calculated as a result of two other
textboxes (TB2, TB3).

I want to make a new calculation and change the value of a fourth textbox
(TB4) as a result of the change in TB1.

I tried OnChange, AfterUpdate and OnDirty but none of these events occur
when the value of the textbox is changed programmatically.

If the value is being changed from code then you already have some code
running. Just do whatever you want in that code or call some other sub or
function from that code.
 
Changing a textbox's value programmatically does not "trigger" any event to
my knowledge. But why not just add the code to your code that changes the
value of TB4 when you change the value of TB1?
 
I have submitted almost the same question today. Are you
doing all of your calculations in a query, so you don't
have code running? I am struggling with this as well.
 
Sarah -

Are you saying that you aren't using code? Can you provide more info about
what you're doing?
 
You can see the related item "How to detect data in a
form field" from Aug 10th at 7:34am.

I have a continuous form with a sum field in the footer.
The form is displaying results of a query. So no code -
just a form displaying query information. The issue is
that I need to detect when that SUM field is finished (ie
the form is finished displaying say 156 lines of data
which is calculated through it's query) So that I can
take that SUM field value, and move on to my next step.
Without an event, I have no trigger to do so.
 
Back
Top