Update bound control with value from unbound control

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...
 
W

Wayne Morgan

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.
 
G

Gordon Lauderback

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"


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top