• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

Access 2003, Copy selected field to clipboard

Hey experts,
I would like to add a button to my form that would copy all the test of a specied field to the clipboard. Is there a simple way I can do this?

Table name: Dispute
Field Name: Reason
Form name: fDispute
0
ggodwin
Asked:
ggodwin
  • 2
1 Solution
 
Jeffrey CoachmanCommented:

    YourTextbox.SetFocus
    DoCmd.RunCommand acCmdCopy
0
 
ggodwinAuthor Commented:
Boag2000,
Thanks for the support on this item.

For anyone reading this in the future here is my actuall code behind button for my "On-Click" event.

Just to be complete:
ResonforRequest is the name of my textbox and I replace "yourTextbox" with my name.

Private Sub CopyTextbox_Click()
On Error GoTo Err_CopyTextbox_Click
 
    ReasonforRequest.SetFocus
    DoCmd.RunCommand acCmdCopy
 
Exit_CopyTextbox_Click:
    Exit Sub
 
Err_CopyTextbox_Click:
    MsgBox Err.Description
    Resume Exit_CopyTextbox_Click
    
End Sub

Open in new window

0
 
Jeffrey CoachmanCommented:
;-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now