Question Copy & Paste VB Code

mitch_johnson

Registered User.
Local time
Yesterday, 23:16
Joined
Mar 18, 2009
Messages
40
hello i am fairly new to access and i dont know much code but i do know the basics of how to add code and how to navigate the properties bar, i would like some code or a way of copying one piece of data from one field into another field inside a form i would like it to copy over when you click a button please could you help?
 
Why not just specify:

Forms!YourNewFormName.YourControlName = Me.YourFieldYouWantToCopy
 
Hello as i said beofre i am very new please could you give me step by step instructions thanks
 
Forms!YourNewFormName.YourControlName = Me.YourFieldYouWantToCopy
You need to put the code Bob specified in the OnClick event procedure of your command button.

YourFormName = The current form that you are using
YourControlName = Name of the text box you want to copy value to (not the caption the actual Name)
Me.YourFieldYouWantToCopy = Name you want to copy from. (Me. specifies the current form you should get a drop down list showing all available when typing)

You have to make sure that both text boxes are the same format and if text box equal length helps eg. Max character value set in table.

Good luck John
 
Last edited:

Users who are viewing this thread

Back
Top Bottom