Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form With Copy & Paste Buttons (2000)

    Is it possible to have Copy and Paste buttons on a form? If possible, how would I code them? I don't want the user to use anything other than the form in front of him/her. Thanks in advance for your usual guidance!

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

    Re: Form With Copy & Paste Buttons (2000)

    What do you want to copy and paste? The contents of a control such as a text box, or an entire record?

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form With Copy & Paste Buttons (2000)

    From and to a "memo field". Investigators make frequent notes in other programs that they paste into the "memo field". At the end, most of those notes are copied and pasted into a final report. Thanks!

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

    Re: Form With Copy & Paste Buttons (2000)

    You don't really need buttons for that - users can press Ctrl+C to copy and Ctrl+V to paste. These commands are also available in the right-click menu, on the toolbar and in the Edit menu.

    If you really want a button, you'd have to ask yourself whether you want the text from the clipboard to replace the current content of the text box, or to be appended at the end, or at the beginning. This is all trivial when the user uses any of the above methods, but you have to make a choice if you want to create your own button.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form With Copy & Paste Buttons (2000)

    If I ask my users to do a CTRL-C or CTRL-V, they'll go on sick-leave. If I even mention right-click, they'll ask for early retirement. So ... since they are used to the buttons, that's the way I should go. When it comes to pasting into the "memo field", I want it pasted at the insertion point they select, without replacing any text whatsoever. Copying from the "memo field" should pose no problem, I think, since they will paste elsewhere. Thanks again for your help!

    PS: BTW, I don't know what I did in "Startup" that doesn't let me do right-clicks anyway.

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

    Re: Form With Copy & Paste Buttons (2000)

    Ctrl+C and Ctrl+V have been the standard shortcuts for copy and paste in *all* Windows programs since 1995 (and in all Macintosh programs since 1984). Perhaps it's time your users learned to use Windows, even if only a tiny little bit?

    You can only do what you want with a keyboard shortcut, a toolbar button, a right-click menu item or a menu item. Not with a command button, sorry.

    If you've cleared the "Allow Default Shortcut Menus" check box in Tools | Startup, you've disabled the built-in right-click menus.

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

    Re: Form With Copy & Paste Buttons (2000)

    I forgot to explain why a command button won't work: the moment the user clicks the command button, the text box loses the focus, and Access "forgets" where the insertion point was. If you set focus to the text box again using code, either the entire text is selected, or the insertion point is placed at the start or end of the text, depending on the setting in the 'Behavior entering field' section of the Keyboard tab of Tools | Options...

    You might be able to store the position of the selection/instertion point in variables, and use that to restore the selection/insertion point, but that becomes rather tricky.

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form With Copy & Paste Buttons (2000)

    Agree with you 100%. It's incredible how PC-phobic people can get. Thanks for the heads-up on the "Default Shortcut Menus". Thanks for caring!

Posting Permissions

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