General discussion

Locked

Copy text box content between text boxes

By hurdk ·
Hello,

I am using Microsoft Access.
I have two forms on the screen
Each form has a text box.
I need a way to copy the contents from one text box to another.
I would like to have a command button to achieve this.

Thank you.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Copy text box content bet ...

what version of access?
try this. say your first text box is text0 and your second is text1. set the control source property of text1 to this expression:
=[formname].[text0].[ControlSource]
does that get you closer to where you want to be?

Collapse -

by john_wills In reply to Copy text box content bet ...

I think this is a slight improvemnt on Sgt Shultz' suggestion.
me.text1=me.text0

Collapse -

by techrep In reply to Copy text box content bet ...

'I think this is a slight improvemnt on Sgt 'Shultz' suggestion.
'me.text1=me.text0

This is the right idea but only works if you're copying the text to another box on the same form. You need to explicitly identify the receiving form with its name (not Me.):

Forms!ReceivingFormName.Text1 = Me.Text1

Also, the receiving form has to be open at the time. This code would go behind the command button on your sending form.

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums