[AccessD] "Simulate" copy and paste of entire column in Runtime?
Ryan W
wrwehler at gmail.com
Tue Jan 31 09:05:47 CST 2017
Yeah I'm trying to avoid API calls here if I can. If preferable I'd like
to find out why my command bar popup doesn't snag what I've got selected..
(probably because it was selected in code and not by the user?).
Frustrating. I wish they'd allow right click menus in the runtime. I get
they've been gone for a long time so if they add them just add a setting to
forms "Right Click Menu" and have it default to disabled as to not break
backwards compatibility!
On Tue, Jan 31, 2017 at 8:57 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