Copy Multiple Lines of Text from our Query (1 Viewer)

access2010

Registered User.
Local time
Today, 01:56
Joined
Dec 26, 2009
Messages
1,019
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
 

Attachments

  • Copy_Multiple_Text_Lines_2_Clipboard.mdb
    728 KB · Views: 91

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:56
Joined
May 7, 2009
Messages
19,169
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.
 

Attachments

  • Copy_Multiple_Text_Lines_2_Clipboard.zip
    68.4 KB · Views: 82

June7

AWF VIP
Local time
Today, 00:56
Joined
Mar 9, 2014
Messages
5,423
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:56
Joined
May 7, 2009
Messages
19,169
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)
 

access2010

Registered User.
Local time
Today, 01:56
Joined
Dec 26, 2009
Messages
1,019
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

Registered User.
Local time
Today, 01:56
Joined
Dec 26, 2009
Messages
1,019
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:56
Joined
May 7, 2009
Messages
19,169
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
 

access2010

Registered User.
Local time
Today, 01:56
Joined
Dec 26, 2009
Messages
1,019
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",View:=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
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:56
Joined
Sep 21, 2011
Messages
14,037
Code:
 WhereCondition:="symbol_stock=" [COLOR="Red"]&[/COLOR] chr(34) & me![symbol_stock] & chr(34)
 

access2010

Registered User.
Local time
Today, 01:56
Joined
Dec 26, 2009
Messages
1,019
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
 

Attachments

  • Investments_Purchases_Sales_R.mdb
    624 KB · Views: 85

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:56
Joined
May 7, 2009
Messages
19,169
you are using a subform so that code will not work.
here try this.
 

Attachments

  • Investments_Purchases_Sales_R.zip
    67.9 KB · Views: 85

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:56
Joined
May 7, 2009
Messages
19,169
you're welcome maam.
 

Users who are viewing this thread

Top Bottom