Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy content from one bound control to another

Status
Not open for further replies.

rmork

Technical User
Nov 15, 2006
36
NO
Hi.
I have a form with a subform. I would like the default value of a bound control in subform to be copied from the bound control in the mainform.
The two forms uses different tables.
I also need to be able to change the value in the subform if I need to. Usually the two values are the same, but sometimes they differ.
How can I acomplish that?
 
In the Current event procedure of the main form and in the AfterUpdate event procedure of the bound control in the main form:
Code:
Me![[i]subform control[/i]].Form![[i]textbox control[/i]].DefaultValue = "'" & Me![[i]bound control[/i]].Value & "'"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you for quick replay
Not sure I got this right.

The mainform is called "AVD02Projects" The textbox in the main form is called "ProjectValue"
I would like to copy this to a textbox called "InvoicedCommissionAmount" in the subform called "AVD02Projects_subInvoices"

There is allready an event in the curernt event presedure of the main form. Can I have two events there, and if so, how do I seperate them.

As you might have guessed I am new to this. Please be patient.. :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top