PC Review


Reply
 
 
kennytwk via AccessMonster.com
Guest
Posts: n/a
 
      18th Jan 2007
hi,

how do i copy a value from a textbox (text0) to the clipboard when i click on
a command button.

DoCmd.MenuItem ....., acCopy

That's as far as i know, can someone enlighten me?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200701/1

 
Reply With Quote
 
 
 
 
John Nurick
Guest
Posts: n/a
 
      18th Jan 2007
Hi Kenny,

First you need to return the focus from the commandbutton to the
textbox. If you use

Screen.PreviousControl.SetFocus

it will go back to whatever control had the focus before you clicked the
button, which means you can use the same button to copy the contents of
more than one control. Then use

DoCmd.RunCommand acCmdCopy

rather than the archaeological DoCmd.MenuItem.

On Thu, 18 Jan 2007 10:57:39 GMT, "kennytwk via AccessMonster.com"
<u30020@uwe> wrote:

>hi,
>
>how do i copy a value from a textbox (text0) to the clipboard when i click on
>a command button.
>
>DoCmd.MenuItem ....., acCopy
>
>That's as far as i know, can someone enlighten me?


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Reply With Quote
 
kennytwk via AccessMonster.com
Guest
Posts: n/a
 
      24th Jan 2007
Hi,

Thanks, your code works

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200701/1

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:57 PM.