Copy Selection into Field

  • Thread starter Thread starter J. E. Goodman
  • Start date Start date
J

J. E. Goodman

I'm guessing this is really basic. I want a really simple code to copy my
selected text so that I can parse it.

I wanted just to place what I have selected elsewhere and I'm missing
something...

Private Sub SelectedItem_Click()
Dim SelectedText
SelectedText = Selection.Select
FirstName = SelectedText
End Sub
 
If FirstName is a (TextBox) Control on the Form with the CommandButton, try
(untested):

Private Sub SelectedItem_Click()
Me.FirstName.SetFocus
DoCmd.RunCommand acCmdPaste
End Sub
 
Back
Top