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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving a variable to the copy command

Status
Not open for further replies.

WaltLukeIII

Programmer
Jun 28, 2000
199
US
I have a group of fields moved to a variable and I want to be able to go to microsoft word and just paste this informaton.
How do you move something to the clipboard where it is copied and all you have to do in MS Word is press paste.

Walt III
SAElukewl@netscape.net
 
there may be an easier way but this is how I do it

place a hidden text box on the form
name it text1

Set rst = Me.RecordsetClone
rst.MoveFirst
x = rst!field1 & rst!field2
rst.Close
Me.Text1.Value = x
Me.Text1.SetFocus
DoCmd.RunCommand acCmdCopy
 
Thanks for your help it moved me in the right direction. this is what I got to work.

Me.Text13.Value = Text0 & (Chr(13)) & Text2 & (Chr(13)) & Text4 & _
", " & Text6 & " " & Text8

Me.Text13.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy

I will make Text13 hidden and return the focus to the button and it will all work great .

Walt III
SAElukewl@netscape.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top