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

Copy & Paste Functionality

Status
Not open for further replies.

dsk525

Programmer
Mar 13, 2002
73
US
Hi all,

I am a beginner in access and I would really appreciate some help
in copying text entry in fields from one form and then pasting that text into another form (it would be the same form where the text was copied from). Could I use a toggle switch to do this kind of a copy and paste function? Thank you in advance!
 
Not sure what you want to do. Do you want a field, let's call it field A to have the same thing that Field B has in it. Like if you had the word DOG in Field A, you want Field B to have DOG in it as well?
 
ok If I understand you what you are trying to do is have the data in one form transfer across to the next open form.

ie. form1
fields surname, first name , phone number.

and you want in form2
fields surname, firstname, phone number to = that of form1.

I hope this is what you want.

This is a method I use.

On click button to open form2 add this

Visible = False

what this will do is to hide form1 but make any data on it accessable.

in form2 in the fields

Surname
Firstname
phonenumber

You will see they have a default value. set the default value to the following.

Surname
=[Forms]![form1]![surname]

Firstname
=[Forms]![form1]![firstname]

Phonenumber
=[Forms]![form1]![phonenumber]

this way when form2 open the values from form1 are automaticly transfered.

ok last but most imortant.

On close of form2 you need to have form1 close as well
otherwise it stays open but hidden.

so just add to the form on close.
DoCmd.Close acForm, "form1", acSaveYes
DoCmd.Close acform, "form2", acsaveYes

Hope this is what you are after.

zero :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top