Double click to Copy/Paste

reel knotty

Registered User.
Local time
Today, 23:07
Joined
Jun 5, 2002
Messages
71
Ok guys I am working on an update form where my dispatchers will double click on a number and it copies it to the clipboard and then goes to the next form and double clicks again to paste the data. Is there a way to do this?


Thanks again!
 
Create a button next to the field you want to copy and place this code in the onclick event

Private Sub YourButton_Click()
DoCmd.GoToControl "YourTextFieldToCopy"
DoCmd.RunCommand acCmdCopy
End Sub

On the field you want to paste it to put the following code on the doubleclick event

Private Sub YourTextFieldToPasteTo_DblClick(Cancel As Integer)
Me.YourTextFieldToPasteTo = ""
DoCmd.RunCommand acCmdPaste
End Sub

IMO
 
Last edited:
Or, On the doubleclick event of the textbox you want to copy

Private Sub Text0_DblClick(Cancel As Integer)
DoCmd.GoToControl "AnotherControl"
DoCmd.GoToControl "YourTextFieldToCopy"
DoCmd.RunCommand acCmdCopy
End Sub

IMO
 
The second one was the one I'm looking for. Thanks... But, What is the "anotherControl"? do i need it to select off then back onto the field I want to copy?
 
Yes, or you'll get an error

IMO
 
Okey Dokey I think it makes sense...

Needs to reselect it to "highlight the text"?
 
Yep, that's the one....

IMO
 

Users who are viewing this thread

Back
Top Bottom