[AccessD] "Simulate" copy and paste of entire column in Runtime?

Bill Benson bensonforums at gmail.com
Tue Jan 31 09:07:02 CST 2017


My response is to push them towards Ctrl-C and Ctrl-v. They are *almost*
universal, I have almost never seen them used for anything else, in any
application  (don't the date back to like DOS 1.0?) And who knows they
might come begging to learn what Ctrl-P  Ctrl-X do. But never ever teach
them what Ctrl-H  does in access.

>From my non-flammable Note 3,
Bill Benson

On Jan 31, 2017 9:59 AM, "Charlotte Foust" <charlotte.foust at gmail.com>
wrote:

I just had to dig up code to copy from a locked disabled subform to the
clipboard using a picture calls, but it only worked.in my situation by
creating a command button that was specific to the single locked control
they wanted to be able to copy.  Leigh Webber has some classes to
encapsulate the process and there are lots of api postings for manipulating
the clipboard, but they all require tweaking.

Charlotte Foust
916-206-4336

On Jan 31, 2017 6:39 AM, "Ryan W" <wrwehler at gmail.com> wrote:

> With the use of the runtime we've lost the ability to click a column
header
> and right click and select copy/paste. You can still use ctrl-c and
ctrl-v,
> but my users.... aren't sure about key combos.
>
>
> I'm tinkering with trying to get some mouse events to do it for me:
>
>
>     If Button = acRightButton And Shift = 1 Then
>         DoCmd.CancelEvent
>
>         Dim rst As DAO.Recordset
>         Me.Rpt.SetFocus
>
>         Set rst = Me.RecordsetClone
>         DoCmd.GoToRecord , , acLast
>         DoCmd.GoToRecord , , acFirst
>
>         Me.SelTop = 1
>         Me.SelHeight = rst.RecordCount
>         commandbars("MyCommandBar").showpopup
>         Set rst = Nothing
>     End If
>
>
> This works in highlighting the entire column (I have to use acLast,acFirst
> to get the entire column if the datasheet has a scroll bar other wise it
> just copies what's been loaded into the view.
>
> But when my command bar comes up and I click "copy", it's not getting that
> rows selection.  It's getting something else that's in focus even though
> Me.Rpt.setfocus was called in code.
>
> If I remove the commandbars popup and do DoCmd.RunCommand acCmdCopy that
> appears to work but then I need to hash out special key combos for copy
and
> paste (in this case I'm using shift + right mouse up) to invoke copy,
since
> right mouse up all by itself invokes a different "toggle on/off" popup for
> the entire column.
>
>
> Does anyone have another take on this or should I just drop it and let
them
> get used to Ctrl-C,Ctrl-V?
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list