Multiple Report printing for current record from check box

O

Ofer

Create a list Box on your form, that give you the list of
all the reports, with Multi Select.
That will let you choose which reports you want to print.
And than when you press the print botton use the code:

Dim VarItm
For Each VarItm In MyCtl.ItemsSelected
docmd.openreport MyCtl.ItemData(VarItm),acPreview, ,
strWhere
Next
 
O

Ofer

The "strWhere" you have to remove it or add your own
filter for the report.

-----Original Message-----
Thank you for taking the time to help
I added the list box ( named MyCtl) and set multi select simple, added the
name's of the reports, then added the following code to a command button
_______________________________________
Private Sub Command205_Click()
Dim VarItm
For Each VarItm In MyCtl.ItemsSelected
DoCmd.OpenReport MyCtl.ItemData(VarItm), acPreview, , strWhere

Next

End Sub
__________________________________________
When I execute the print button I receive the followin error Run-time 424
object required


Ofer said:
Create a list Box on your form, that give you the list of
all the reports, with Multi Select.
That will let you choose which reports you want to print.
And than when you press the print botton use the code:

Dim VarItm
For Each VarItm In MyCtl.ItemsSelected
docmd.openreport MyCtl.ItemData (VarItm),acPreview, ,
strWhere
Next

-----Original Message-----
I would like to be able to add a group of check box's
to
a form and when the
box is checked click a command button that will cause all of the reports
selected (for Current Record only) to print with out having to select print
on the report page, I have attached a copy of the code
I
am using to display
the current record in the report. but them I must hit
the
print button for
each report then select a new command button for the
next
report .
additional reports are named FirstCall, FDchecklist, flowerRoom

Example of current command button code (This works
great)
but to be able to
select more than one report would just be Gravy
Note FDMS is the unique record identifer

Dim strDocName As String
Dim strWhere As String
strDocName = "InMemoryWoman"
strWhere = "[FDMS]=""" & Me!FDMS & """"
DoCmd.OpenReport strDocName, acPreview, , strWhere
--
Thank you for your help

Terry
.
.
 
T

terry

Add the following code
Dim VarItm
Dim StrWhere As String

For Each VarItm In MyCtl.ItemsSelected
DoCmd.OpenReport MyCtl.ItemData(VarItm), acPreview, , StrWhere =
"[FDMS]=""" & Me!FDMS & """"
**** Note FDMS is the record number I use to identify the record I want ,
Still recieving error 424 ?



Ofer said:
The "strWhere" you have to remove it or add your own
filter for the report.

-----Original Message-----
Thank you for taking the time to help
I added the list box ( named MyCtl) and set multi select simple, added the
name's of the reports, then added the following code to a command button
_______________________________________
Private Sub Command205_Click()
Dim VarItm
For Each VarItm In MyCtl.ItemsSelected
DoCmd.OpenReport MyCtl.ItemData(VarItm), acPreview, , strWhere

Next

End Sub
__________________________________________
When I execute the print button I receive the followin error Run-time 424
object required


Ofer said:
Create a list Box on your form, that give you the list of
all the reports, with Multi Select.
That will let you choose which reports you want to print.
And than when you press the print botton use the code:

Dim VarItm
For Each VarItm In MyCtl.ItemsSelected
docmd.openreport MyCtl.ItemData (VarItm),acPreview, ,
strWhere
Next


-----Original Message-----
I would like to be able to add a group of check box's to
a form and when the
box is checked click a command button that will cause
all of the reports
selected (for Current Record only) to print with out
having to select print
on the report page, I have attached a copy of the code I
am using to display
the current record in the report. but them I must hit the
print button for
each report then select a new command button for the next
report .

additional reports are named FirstCall, FDchecklist,
flowerRoom

Example of current command button code (This works great)
but to be able to
select more than one report would just be Gravy
Note FDMS is the unique record identifer

Dim strDocName As String
Dim strWhere As String
strDocName = "InMemoryWoman"
strWhere = "[FDMS]=""" & Me!FDMS & """"
DoCmd.OpenReport strDocName, acPreview, , strWhere
--
Thank you for your help

Terry
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top