Results 1 to 2 of 2
  1. #1
    vbclueless is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Posts
    3

    Copy only the selected text to the clipboard, and not the whole field

    Field called copyfrom is a memo field which could potentially contain a whole long story.
    I have a form on which copyfrom is shown, and I want for my user to be able to hi-light only that word/sentence/paragraph that he wants to select, then when he clicks on a button ONLY THAT SELECTION must be copied to a different field, called copyto.

    Below is the code I have managed up to this point for the onclick event:
    Me!copyfrom.SetFocus
    DoCmd.RunCommand acCmdCopy
    Me!copyto.SetFocus


    DoCmd.RunCommand acCmdPaste

    But this copies the entire field and not only the selection. PLEASE HELP! (and note please that I am a novice)

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    If a random string is selected, you're out of luck with Access. If the string is always in the same position, you can use the Mid function to parce the entire field.

    Maybe you can use Google to find an API that will accomplish what you want.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. find value of selected field in a table
    By Bic in forum Programming
    Replies: 1
    Last Post: 02-05-2010, 07:40 PM
  2. Replies: 9
    Last Post: 11-26-2009, 05:03 PM
  3. copy data from text file into table in access
    By miziri in forum Programming
    Replies: 3
    Last Post: 08-12-2009, 03:02 PM
  4. Replies: 5
    Last Post: 06-17-2009, 02:18 PM
  5. Clearing the clipboard with VBA?
    By Simon Sweet in forum Programming
    Replies: 1
    Last Post: 04-17-2008, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums