Copy Selection into Field

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
 
V

Van T. Dinh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top