What event of a field should I use

B

babs

I have tied that two fields should equal each other After the update Event of
the first given field. It works fine if I am actually hand typing the info
and hit tab - then they both are equal. However when I Fill that field based
on a value selected in a drop down of a field just before it - it fills the
first field of the two that should be equal - but the second one remain
whatever it was before - think I should say they are EQUAL at a different or
Additional Even to the After update event.

Thanks,
Barb
 
K

Klatuu

First, you don't have fields on a form. They are controls. Fields belong to
tables and queries and can be bound to controls.
hand typing the value into the control and moving out of the control causes
the after update event of the control to fire. That is where you are
probably setting the value of the second control. If you programmatically
change the value of a control the after update event does not fire. So when
you change the value of the control using the combo box (drop down), you are
probably doing that in the after update event of the combo box. The third
control then will not change value. You can, however, call the After Update
event of the control after the combo box and it will cause it to change

Private sub MyCombo_AfterUpdate()

Me.Control1 = Me.MyCombo
Call Control1_AfterUpdate

End sub
 
J

John W. Vinson

I have tied that two fields should equal each other After the update Event of
the first given field.

Why?

That is... why should you store the same value redundantly in two different
fields?


John W. Vinson [MVP]
 
Top