Stuart McLachlan
stuart at lexacorp.com.pg
Wed Aug 17 22:09:55 CDT 2005
On 17 Aug 2005 at 22:32, Bryan Carbonnell wrote: > On 18 Aug 2005 at 12:28, Bruen, Bruce wrote: > > > This must! be simple. > > > > I have a string variable created by concatenating the values of > > several form fields. So how can I copy the value of this string to > > the clipboard? > > > > Private Sub Command35_Click() > > Dim refstr As String > > refstr = "RCRef=|" & Me.ucref & "|" & Me.testname & "|" & > > Me.TestID > > & "|" > > Debug.Print refstr > > Stop > > ':-( Runcmd accmdStickTheStringInTheClipboard :-( > > End Sub > > It's an API call. > > Have a look at http://www.mvps.org/access/api/api0049.htm for the > gory details. > I'm trying to dig up some code I have to do this - can't find it at the moment. As Brian says, it's fairly gory. It needs memallocs and deallocs plus determining the correct datatype. As a quick and dirty workaround, you may be able to put the string in a control, set focus to the control and use Docmd.RunCommand acCmdCopy -- Stuart