A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update bound control with value from unbound control



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2004, 04:59 PM
Gordon Lauderback
external usenet poster
 
Posts: n/a
Default Update bound control with value from unbound control

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...
  #2  
Old August 24th, 2004, 06:07 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default

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" wrote in message
...
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...



  #3  
Old August 24th, 2004, 10:33 PM
Gordon Lauderback
external usenet poster
 
Posts: n/a
Default

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"

wrote in message
...
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...



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bound control in Access does not display gifs and jpg only bitmap Claudio General Discussion 1 August 17th, 2004 03:20 AM
Update another table with a Max record query Ngan Running & Setting Up Queries 2 June 22nd, 2004 05:01 PM
How to update value in Main report control from subreport Sunny Setting Up & Running Reports 3 June 7th, 2004 11:02 PM
HOW TO UPDATE A TABLE BASED ON CHANGES IN ANOTHER TABLE? Eva Lyshoel Database Design 1 May 30th, 2004 09:46 PM
HOW TO UPDATE A TABLE BASED ON CHANGES IN ANOTHER TABLE? Eva Lyshoel Using Forms 1 May 27th, 2004 11:08 AM


All times are GMT +1. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.