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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Text Box Value

Status
Not open for further replies.

applemacman

Technical User
Mar 26, 2008
9
GB
Hi, im a new user to access and have been trying to create a database.

To simplfy the problem i have a form with a text box and a sub form with another text box in it.

I would like to know how to copy the data from Text box 1 to Text box 2 on the sub form. This process should happen when the user clicks on the second text box.

Sorry if this has been covered elsewhere, i have tried searching but could not find this.

Thanks for reading,

Nick
 
In the appropriate event procedure of Text box 2:
Me.[Text box 2].Value = Me.Parent.[Text box 1].Value

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the quick reply!

I just tried that and it says that

Microsoft Access can't find the macro 'Me.'

I have to then click OK and nothing has been copied. Any suggestions?
 
Sounds as though you have just put the code in the event instead of putting it VBA. Is this correct?

Ian Mayor (UK)
Program Error
Always make your words short and sweet. Because you never know when you may have to eat them.
 
yes i have just put it in the code builder and it works now!

Thanks for the quick replies!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top