A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple Reports



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2004, 08:39 AM
James
external usenet poster
 
Posts: n/a
Default Multiple Reports

Hi

I have a form (frmResignDataCustom) that has six potential
reports to print from the information it contains. I have
set up a command button for the user to click and all six
reports will print consecutively.

What I would like to do is enable the user to select which
reports they would like to print with check boxes and then
hit a "print button". Currently I have set up a form
(frmCustomPrint) with six check boxes and print/cancel
command buttons. The idea is that this form
(frmCustomPrint) will open when the "frmResignDataCustom"
print button is clicked and the user can "check" any of
the required reports and hit the print button on the user
form - thus only printing required reports.

I thought I could do this with an IIF statement based on
the unbound toggle boxes but I am making no progress.

Please is this possible? Any help/suggestions would be
greatly appreciated.

Thanks in advance.

James

  #2  
Old May 21st, 2004, 09:49 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default Multiple Reports

James,

The code behind the Print command button should look something like:

Private Sub CmdPrint_Click()
Dim ArrReports(5,1) As String
Dim i as Integer
'put the actual report and checkbox names next
ArrReports(0,0) = "ReportName1"
ArrReports(1,0) = "ReportName2"
ArrReports(2,0) = "ReportName3"
ArrReports(3,0) = "ReportName4"
ArrReports(4,0) = "ReportName5"
ArrReports(5,0) = "ReportName6"
ArrReports(0,1) = "CheckBox1"
ArrReports(1,1) = "CheckBox2"
ArrReports(2,1) = "CheckBox3"
ArrReports(3,1) = "CheckBox4"
ArrReports(4,1) = "CheckBox5"
ArrReports(5,1) = "CheckBox6"

For i = 0 to 5
If Me.Controls(ArrReports(i,1)) = True Then
DoCmd.OpenReport ArrReports(i,0), acViewNormal
End If
Next i

End Sub

HTH,
Nikos

"James" wrote in message
...
Hi

I have a form (frmResignDataCustom) that has six potential
reports to print from the information it contains. I have
set up a command button for the user to click and all six
reports will print consecutively.

What I would like to do is enable the user to select which
reports they would like to print with check boxes and then
hit a "print button". Currently I have set up a form
(frmCustomPrint) with six check boxes and print/cancel
command buttons. The idea is that this form
(frmCustomPrint) will open when the "frmResignDataCustom"
print button is clicked and the user can "check" any of
the required reports and hit the print button on the user
form - thus only printing required reports.

I thought I could do this with an IIF statement based on
the unbound toggle boxes but I am making no progress.

Please is this possible? Any help/suggestions would be
greatly appreciated.

Thanks in advance.

James



  #3  
Old May 22nd, 2004, 01:09 AM
external usenet poster
 
Posts: n/a
Default Multiple Reports

Thanks Buddy

Works perfectly. I'd kiss you if I could.

James
-----Original Message-----
James,

The code behind the Print command button should look

something like:

Private Sub CmdPrint_Click()
Dim ArrReports(5,1) As String
Dim i as Integer
'put the actual report and checkbox names next
ArrReports(0,0) = "ReportName1"
ArrReports(1,0) = "ReportName2"
ArrReports(2,0) = "ReportName3"
ArrReports(3,0) = "ReportName4"
ArrReports(4,0) = "ReportName5"
ArrReports(5,0) = "ReportName6"
ArrReports(0,1) = "CheckBox1"
ArrReports(1,1) = "CheckBox2"
ArrReports(2,1) = "CheckBox3"
ArrReports(3,1) = "CheckBox4"
ArrReports(4,1) = "CheckBox5"
ArrReports(5,1) = "CheckBox6"

For i = 0 to 5
If Me.Controls(ArrReports(i,1)) = True Then
DoCmd.OpenReport ArrReports(i,0), acViewNormal
End If
Next i

End Sub

HTH,
Nikos

"James" wrote in

message
...
Hi

I have a form (frmResignDataCustom) that has six

potential
reports to print from the information it contains. I

have
set up a command button for the user to click and all

six
reports will print consecutively.

What I would like to do is enable the user to select

which
reports they would like to print with check boxes and

then
hit a "print button". Currently I have set up a form
(frmCustomPrint) with six check boxes and print/cancel
command buttons. The idea is that this form
(frmCustomPrint) will open when

the "frmResignDataCustom"
print button is clicked and the user can "check" any of
the required reports and hit the print button on the

user
form - thus only printing required reports.

I thought I could do this with an IIF statement based on
the unbound toggle boxes but I am making no progress.

Please is this possible? Any help/suggestions would be
greatly appreciated.

Thanks in advance.

James



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.