Update bound control with value from unbound control

  • Thread starter Thread starter Gordon Lauderback
  • Start date Start date
G

Gordon Lauderback

I have a bound control field (FIELD1) and an unbound
control field (FIELD2)on the same form. I want the user
to be able to put a value in the unbound field (FIELD2)
and update FIELD1 in the table with the sum of both
fields.

Any help would be appreciated...

Thanks...
 
In the AfterUpdate event of the unbound control, add the two values and
assign it to the bound control.

Example:
Me.txtField1=Me.txtField1 + Me.txtField2

You may have problems if the control and the field it is bound to have the
same name. If so, rename the control. The easiest way to do this is usually
to add a prefix to the name, such as the txt above to indicate a textbox.
 
Thank you sir,

-----Original Message-----
In the AfterUpdate event of the unbound control, add the two values and
assign it to the bound control.

Example:
Me.txtField1=Me.txtField1 + Me.txtField2

You may have problems if the control and the field it is bound to have the
same name. If so, rename the control. The easiest way to do this is usually
to add a prefix to the name, such as the txt above to indicate a textbox.

--
Wayne Morgan
Microsoft Access MVP


"Gordon Lauderback"


.
 
Back
Top