Re: Select & Copy text in text box not working (2003)

Two possibilities:
<UL><LI>Me.Text0.SetFocus
RunCommand acCmdCopy

<LI>You could set a reference (in the Visual Basic Editor, select Tools | References...) to the Microsoft Forms 2.0 Object Library (C:WindowsSystem32FM20.dll). This library contains an object DataObject that can be used to put text on the Clipboard:

Dim MyData As New DataObject
MyData.SetText Me.Text0
MyData.PutInClipboard
Set MyData = Nothing[/list]Both will place the contents of Text0 on the clipboard, ready to be pasted.

Re: Select & Copy text in text box not working (20

[quote name='HansV' post='615805' date='22-Nov-2006 13:18']Dim MyData As New DataObject
MyData.SetText Me.Text0
MyData.PutInClipboard
Set MyData = Nothing[/list]Both will place the contents of Text0 on the clipboard, ready to be pasted.[/quote]
This second option is what I would like to do. I'm using Access 2003 and it doesn't have a Microsoft Forms x.0 library but my PC does have the FM20.DLL file. Does Access still have it under a different library name?

You know it's time to diet when you push away from the table and the table moves.

The FM20.DLL file *is* the Microsoft Forms 2.0 Object Library. To set a reference to it in Access, select Tools | References... in the Visual Basic Editor, click Browse..., navigate to C:\Windows\System32 and select FM20.DLL, then click Open and OK.

[quote name='HansV' post='779190' date='10-Jun-2009 12:29']The FM20.DLL file *is* the Microsoft Forms 2.0 Object Library. To set a reference to it in Access, select Tools | References... in the Visual Basic Editor, click Browse..., navigate to C:\Windows\System32 and select FM20.DLL, then click Open and OK.[/quote]

I got it now. I was expecting to see it in the list that is displayed when you do Tools | References but I couldn't find it in the list. I didn't think about browsing to it. Thank you for that clarification. Have a wonderful day!

You know it's time to diet when you push away from the table and the table moves.