Johnny-Walker,
Okay... the code I provided is not for a macro and does not allow for using
the query to select the ID. The way I *thought* you were selecting the ID
was via a form AND you would only include one report per line, ie...
1. Form opens with combo box where you would select the ID
2. Button on form to open your report would include this in the On_Click
event of the button...
DoCmd.OpenReport "Page1", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
DoCmd.OpenReport "Page2", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
DoCmd.OpenReport "Page3", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
DoCmd.OpenReport "Page4", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
DoCmd.OpenReport "Page5", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
OR if you put the pages on page 1 as subreports (with pagebreaks) linked by
ID then...
DoCmd.OpenReport "Page1", acViewPreview, ,"[YourEmployeeIDField]='" &
Me![cboYourEmployeeIDFieldOnForm] & "'"
Gina said:
[quoted text clipped - 19 lines]
THANK YOU IN ADVANCE FOR ANY HELP ON THIS!!!!!!
Gina,
I am new to this so I have a few questions: I start by clicking on the first
report & then a box opens to enter the ID# of the employee records I am
looking for. I re-enter the same ID in the rest of the boxes to open the
rest of the 4 remaining reports to open all of them. The reports are driven
from a query and under the ID# in the query I put [Enter Employee ID
Number:]
So
1st question can I enter the code you provided in a macro and set the 1st
report to open the additional reports On Click?
the Id#'s are from 70 to 600 do I enter that range in the code you provided
?
and in the code you provided do I seperate each report name with a comma?
Example:
DoCmd.OpenReport "Page1,Page2,Page3,Page4,Page5", acViewPreview, ,
"[YourEmployeeIDField]='" & Me![cboYourEmployeeIDFieldOnForm] & "'"
where would I ente rthe Id# range example 07-600
Thank Again Gina I really appreciate Your Help!!!