SendKeys Copy and Paste

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
 
G

Guest

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.
 
G

Guest

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
 
S

Scott McDaniel

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SendKeys "+{right}" problem 1
How to code this 1
Access2003, SendKeys and Vista 9
Sendkeys 6
Copy to clipboard using SendKeys 5
Place curser at end of line? 4
Access Using Copy in Access 2007 0
Send data from Access to IE 5

Top