Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-26-2019, 08:15 PM   #1
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Copy Multiple Lines of Text from our Query

Can I please have a suggestion on how we can copy Multiple Lines of Text which are in our Query to the clipboard and then print the grouping?

Group all of the same records in the query by = Symbol Code =
Copy the grouped records = lines of text = to the clipboard

Your suggestions will be appreciated.

Nicole
Attached Files
File Type: mdb Copy_Multiple_Text_Lines_2_Clipboard.mdb (728.0 KB, 7 views)

access2010 is offline   Reply With Quote
Old 07-26-2019, 09:13 PM   #2
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Copy Multiple Lines of Text from our Query

what is the purpose of copying to clipboard?
you can always create a report that is grouped and sorted.
see the report I made if this is what your intent.
Attached Files
File Type: zip Copy_Multiple_Text_Lines_2_Clipboard.zip (68.4 KB, 3 views)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (07-29-2019)
Old 07-26-2019, 09:15 PM   #3
June7
AWF VIP
 
June7's Avatar
 
Join Date: Mar 2014
Location: The Great Land
Posts: 2,428
Thanks: 0
Thanked 568 Times in 564 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: Copy Multiple Lines of Text from our Query

Print a filtered report.

Records of table or query or form can be selected and copied to clipboard but then they have to be pasted somewhere, such as in an Excel spreadsheet or an email. I don't know any way to print directly from clipboard.

__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
June7 is offline   Reply With Quote
The Following User Says Thank You to June7 For This Useful Post:
access2010 (07-29-2019)
Old 07-26-2019, 09:24 PM   #4
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Copy Multiple Lines of Text from our Query

the report I made is for all Symbol_Stock (grouped).
if you need to print a specific Symbol_Stock, ie. CSCO, you can print a filtered report.
Code:
Docmd.OpenReport ReportName:="rptInvestments_Purchases_Sales_Q",View:=acViewPreview, WhereCondition:="[Symbol_Stock]=" & Chr(34) & "CSCO" & Chr(34)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (07-29-2019)
Old 07-27-2019, 08:40 PM   #5
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Copy Multiple Lines of Text from our Query

arnelgp
Thank you for your assistance and we are at 99% complete.
How can we programmatically print your report for the = Symbol_Stock = which is currently on the page?
Each time the form opens up there will be a different = Symbol_Stock =

Thank you Crystal
access2010 is offline   Reply With Quote
Old 07-27-2019, 08:47 PM   #6
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Copy Multiple Lines of Text from our Query

June7
Thank you for your note.
There are no programmers in our volunteer office and the best Idea we had was to use the Query on our form to group the records that we wanted to print by their = Symbol Code = and then manually copy the data from the = grouped Symbol Code query = to a Word document and then print the records.

Crystal
access2010 is offline   Reply With Quote
Old 07-27-2019, 09:04 PM   #7
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Copy Multiple Lines of Text from our Query

create a button on the form.
on its Click event add this code:
Code:
Private sub buttonName_Click()
Docmd.OpenReport ReportName:="rptInvestments_Purchases_Sales_Q",View:=acViewPreview, WhereCondition:="symbol_stock=" chr(34) & me![symbol_stock] & chr(34)
End Sub

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (07-29-2019)
Old 07-28-2019, 09:22 AM   #8
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Copy Multiple Lines of Text from our Query

arnelgp
Thank you for your suggestion which I have tried as noted below, without success.
Error messages
Compile Error and Syntax Error
=

Private Sub arnelgp_Click()
' your code was = Private Sub buttonName_Click()
'Button name = arnelgp
Docmd.OpenReport ReportName:="rptInvestments_Purchases_Sales_Q",Vie w:=acViewPreview, WhereCondition:="symbol_stock=" chr(34) & me![symbol_stock] & chr(34)
' report name = rptInvestments_Purchases_Sales_Q
End Sub
=
Can you please advise me as to what I have done wrong?
Thank you.
Nicole
access2010 is offline   Reply With Quote
Old 07-28-2019, 10:15 AM   #9
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,396
Thanks: 436
Thanked 805 Times in 780 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: Copy Multiple Lines of Text from our Query

Code:
 WhereCondition:="symbol_stock=" & chr(34) & me![symbol_stock] & chr(34)
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
The Following User Says Thank You to Gasman For This Useful Post:
access2010 (07-29-2019)
Old 07-28-2019, 06:48 PM   #10
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Copy Multiple Lines of Text from our Query

Gasman
Thank you for your suggestion, but we are still receiving A Compile Error and A Syntax Error.
Could you please give us an other suggestion?
I have renamed the uploaded data base to = Investments_Purchases_Sales_R.mdb
Thank you,
Crystal
Attached Files
File Type: mdb Investments_Purchases_Sales_R.mdb (624.0 KB, 2 views)
access2010 is offline   Reply With Quote
Old 07-28-2019, 09:46 PM   #11
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Copy Multiple Lines of Text from our Query

you are using a subform so that code will not work.
here try this.
Attached Files
File Type: zip Investments_Purchases_Sales_R.zip (67.9 KB, 6 views)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (07-29-2019)
Old 07-29-2019, 08:54 AM   #12
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 484
Thanks: 287
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Copy Multiple Lines of Text from our Query

arnelgp

P.E.R.F.E.C.T

Thank you
Nicole
access2010 is offline   Reply With Quote
Old 07-29-2019, 09:18 AM   #13
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Copy Multiple Lines of Text from our Query

you're welcome maam.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
access2010 (07-29-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Multiple Lines to the Clipboard access2010 Forms 2 04-03-2019 07:55 PM
Copy lines in a table/query using VBA Snappy Modules & VBA 4 11-07-2013 09:06 AM
Text box Multiple lines mike30x Forms 6 05-24-2012 02:59 PM
Pulling SQL query on multiple lines. jgier Modules & VBA 13 04-02-2012 10:22 AM




All times are GMT -8. The time now is 02:39 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World