SendKeys Copy and Paste

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2003:

I created a simple database for data entry. Data is entered in a text box.
Sometimes the same information entered into one text needs to be entered into
another. Well I just created a cmd button and wanted to use send keys to
copy and paste data in. But it does not work. Can someone help? It will
not copy and paste. Or there a better way to do this? I am trying to copy
the text in "txtIndividualLast" and paste in "txtReqEntity1" thanks for any
help.

txtIndividualLast.SetFocus
SendKeys "^(C)", True
txtReqEntity1.SetFocus
SendKeys "^(V)", True
 
Forget sendkeys exist. In the after updatevent of txtIndividualLast:
Copy and Paste is for kids in kindergarten making things to hang on mom's
refrigerator.

In the after updatevent of txtIndividualLast:
Me.txtReqEntity1 = Me.txtIndividualLast

Sorry, I really don't mean to be rude, just trying to make a point.
 
Good tip but does meet my need. I do not always want to update. It has to
be optional that is why I want to the user the option with cmd button. Any
other suggestions. Thanks
 
Good tip but does meet my need. I do not always want to update. It has to
be optional that is why I want to the user the option with cmd button. Any
other suggestions. Thanks


Just put the code klatuu provided in the Click event of your command button:

Sub YourButton_Click()

Me.txtReqEntity1 = Me.txtIndividualLast

End Sub



Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
If you want to make it optional for the user to select it, put the code I
posted in the Click event of a command button.
 
Back
Top