Select All records in datasheet view for copy (1 Viewer)

Rx_

Nothing In Moderation
Local time
Today, 04:02
Joined
Oct 22, 2009
Messages
2,803
[Solved] Select All records in datasheet view for copy

Trying to Copy All records in a Datasheet view into a variable.
Will use variable to paste into a new blank Excel worksheet (using vba).


A form (MyForm) with a SubForm (sfRowList) Default View as Datasheet. MyForm has a search to filter that works. And, the users like the feature to resort any column.

Once the users filter and sort the data, they can click in the upper left-hand corner of the header/row of the dataview and basically "Select All". Then they can paste the selected headers and records into Excel.


What is the VBA for the "Select All" and copy of the subform's data from the parent form (see button Copy to Excel in attachment)?
 

Attachments

  • SelectAll.png
    SelectAll.png
    25.6 KB · Views: 751
  • sfROWList.png
    sfROWList.png
    10.8 KB · Views: 595
Last edited:

Rx_

Nothing In Moderation
Local time
Today, 04:02
Joined
Oct 22, 2009
Messages
2,803
Wow, I had realized the recordset was the key and started doing this from scratch.
Thanks to your speedy response, the code you point to is just perfect for me to start with and modify for my own reporting format.

Thanks to you, I can finish early this Friday and enjoy our 3 day Labor Day weekend!
Your web page is in my Favorites! Thanks Heaps!
 

Rx_

Nothing In Moderation
Local time
Today, 04:02
Joined
Oct 22, 2009
Messages
2,803
http://btabdevelopment.com/
Access Experts was nice enough to take the old Bob Larson BTABDevelopment site and preserve the code.
I won't have time to find the code you requested. If you do find it, please post it for others who follow.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:02
Joined
May 7, 2009
Messages
19,175
another alternative to copy all records displayed in subform:

DoCmd.GoToControl "sfRowList"
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
 

Users who are viewing this thread

Top Bottom