Separate report for each group

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report for many employees. I want to be able to have a report for
each individual employee. Is there a way to break out a report into separate
reports ? (the title of the report would be the employee name and employee
number)
 
In the report open the sorting and grouping (in the menu bar select view >
sorting and grouping) select in the field the employee number, and on the
buttom select header and footer Yes.
Now you have two parts added to your report.
In the Header of the employee id put the two fields employee and employee
name
In the footer section insert a page break, that will force a new page for
each employee.
 
I wanted them to be separate reports, not in the same report.

Report one would be named: Johnson 1AA23
Report two would be named: Smith 13223
and so with the naming convention to be employee name and number.
 
You can set the Report caption to include the name and number of the Employee
On the On format Property of the Detail section you can write the code
Me.Caption = Me.[Emplyee Name] & " " [Emplyee Number]

To print seperate report for each employee, you need to create a loop that
go through the employee table, and print a report for each employee

Dim MyDB as DAO.DataBse , Myrec as recordset, MyCondition as String
Set MyDB = currentDB
Set MyRec = MyDb.OpenRecordset("Setect * From EmployeeTable")
While Not MyRec.eof
MyCondition = "[Emplyee Number] = " & MyRec![Emplyee Number]
docmd.OpenReport "ReportName" ,,,MyCondition
MyRec.MoveNext
Wend
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck
 
Back
Top