Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Value of control to contents of clipboard

Status
Not open for further replies.

raygunc

Programmer
Dec 29, 2003
10
0
0
GB
I've tried searching for the answer but not resolved this problem.

Is it possible to set the value of a control (text box) to the contents (text) of the clipboard.

I want my form to have a button on it that the user presses to paste the contents of the clipboard into the control. I appreciate there is already a paste button on the toolbar but I wanted something close to the control specific for this task.

I've tried:

me!txtCtrl=acpaste

However, instead of the expected text I get a number

I assume I'm missing a step somewhere

Any ideas please?

Developed using Access97 only

Ta

Ray
 
try

[tt]me!txtCtrl.setfocus
docmd.runcommand accmdpaste[/tt]

Roy-Vidar
 
Brilliant

Thanks Roy - works a treat!

Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top