Copy button

  • Thread starter gymcshoe via AccessMonster.com
  • Start date
G

gymcshoe via AccessMonster.com

is there a way to create a button that when clicked, it copies the
information in a text box?
 
A

akphidelt

Yes there is, but the question is, what do you want it to do with that copied
data?
 
G

gymcshoe via AccessMonster.com

I want to copy whatever is in the text box, to paste elsewhere... like in a
browser.. or text file..
 
A

Allen Browne

In that case:

1. Set the On Click property of your command button to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Between the "Private Sub..." and End Sub lines, paste the suggested code,
i.e.:
Me.[MyTextBox].SetFocus
RunCommand acCmdCopy

4. Change the MyTextBox to the name of your text box.

5. Verify that Access understands the code, by choosing Compile on the Debug
menu.
 
G

gymcshoe via AccessMonster.com

Hey Allen, this worked perfectly! Thanks for the detailed and easy
instructions!
 
Top