Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Texas, USA
    Posts
    374
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Clipboard procedure (2002)

    How to write the following form event procedures?

    1) Clearing everything on clipboard
    2) Copying the contents of [ID] field to clipboard

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Clipboard procedure (2002)

    I don't know the answer to question 1). Here are my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15> on question 2):
    <UL><LI>On a form, you could use

    Me.[ID].SetFocus
    RunCommand acCmdCopy

    <LI>You could set a reference (in the Visual Basic Editor, select Tools | References...) to the Microsoft Forms 2.0 Object Library (C:WindowsSystem32FM20.dll). This library contains an object DataObject that can be used to put text on the Clipboard:

    Dim MyData As New DataObject
    MyData.SetText Me.[ID]
    MyData.PutInClipboard

    <LI>For complete control over the Clipboard, you'll probably need to use the Windows API functions OpenClipboard, GetClipboardData, SetClipboardData and CloseClipboard.[/list]Well, that's 3 cents, actually. Perhaps others have more ideas.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Clipboard procedure (2002)

    There is code for manipulating the clipboard in the Access 2002 Developers Handbook, by Litwin, Getz and Gunderloy.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Texas, USA
    Posts
    374
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Clipboard procedure (2002)

    Hans, I found the clearing clipboard procedure here.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Clipboard procedure (2002)

    Fine!

    You can also find code to manipulate the clipboard (including clearing it) at API: Copy variables/control contents to memory in Dev Ashish's Access Web.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •