Print from listbox selection

charityg

Registered User.
Local time
Today, 02:22
Joined
Apr 17, 2001
Messages
634
Ok. I know the long way to do it.
For each varposition in listbox.itemsselected
docmd.openreport "rptname" where blah blah
next varposition
Is there a way to add all listbox selections to a recordset and print only or preview only those records?
The method I know would open a separate report for each record. (Pretty slow)
 
Just use the itemsselected property to create the SQL string for the creation of a recordset.
This recordset can be transformed into a query with its name-property (see ACCESS ENCYCLOPEDIA for sample code)
 
I used a variation of your idea. I used the ItemsSelected property to create a criteria string..."where this or that or this or that" and opened the report with the string applied. Thanks for your help! I've answered questions for so many people in this forum, but you are only the second person who's answered a question for me. I can usually figure out my issues on my own, but it's always nice to get a conk on the head to get me thinking.
 

Users who are viewing this thread

Back
Top Bottom