[AccessD] How to copy from Access Grid form, without getting the column headers

Mark Breen marklbreen at gmail.com
Thu Jul 9 09:46:13 CDT 2009


Hello All,
The follow two routines work good enough for what I needed.  The first
routine is placed in the on_Current of a subform, as you can see, all it
does it place the contents of the current row onto a hidden text box on the
parent form.  It used a short function that returns a string F_str named
GetRow with no parameters.

The second function then just copies the contents of that textbox on to the
clipboard.  It is not as sophisticated as talking directly to the clipboard,
but it is working now, so that is good enough.

Hope it is useful to someone, sometime,

Mark Breen
Ireland





Private Sub Form_Current()
    Me.Parent.txtClip.Value = F_strGetRow
End Sub


Private Sub cmdCleanCopy_Click()
    Me.txtClip.SetFocus
    Application.DoCmd.RunCommand acCmdCopy
End Sub


2009/7/3 Darryl Collins <Darryl.Collins at coles.com.au>

> heh... Aaaah Susan, You wouldn't believe some of the stuff I tried when I
> started using Access more seriously. ;)  If it looks remotely promising and
> you are stuck, give it a try and see what happens I say!
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:
> accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
> Sent: Friday, 3 July 2009 9:08 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] How to copy from Access Grid form, without getting
> the column headers
>
> That's what I figured -- worth a try.
>
> Susan H.
>
>
>
> > Excel would still paste the values including the header in this case.
> > "Values Only" means don't paste any formulae or formatting, just the
> > values that the formulae return sans formatting...
> >
> > cheers
> > Darryl
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> This email and any attachments may contain privileged and confidential
> information
> and are intended for the named addressee only. If you have received this
> e-mail in
> error, please notify the sender and delete this e-mail immediately. Any
> confidentiality, privilege or copyright is not waived or lost because this
> e-mail
> has been sent to you in error. It is your responsibility to check this
> e-mail and
> any attachments for viruses.  No warranty is made that this material is
> free from
> computer virus or any other defect or error.  Any loss/damage incurred by
> using this
> material is not the sender's responsibility.  The sender's entire liability
> will be
> limited to resupplying the material.
>
>
> --
> 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