• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

Using a table to run a query from and writing each item into a report.

I have a table with Department Numbers and names and need to create reports for each of the department numbers from the table.  The reports are created from a personnel table and it would be by department number.  I am working to automate the report creation versus someone having to select 200 separate department numbers.

Table one - TBL_Dept_List  -  DeptNo, DeptName, TotalTeam
Report has data in it along with the team member information with the DeptNo as the link.

Could use a little help  Thank you.
0
frank_guess
Asked:
frank_guess
  • 4
  • 3
  • 3
  • +1
1 Solution
 
Richard DanekeTrainerCommented:
You can create a table of department numbers and do VBA module to read the table and create a report for each table value.
You can create a table of all departments and use an additional field to select departments on which to report and do VBA module to read the table and create a report for each table value.
Both of the above would generate a different report for each department or
You can create a table as above and use it in a query to create your reports in one file.
0
 
danishaniCommented:
0
 
frank_guessAuthor Commented:
Thank you
The problem is I have the table already finished but I am looking for the module or code behind the button to make this happen.  

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
danishaniCommented:
Did you try to create a Report based on a Group/ Section of your DepartmentName / No?
Then follow the steps as suggested in my link.

HTH,
Daniel
0
 
Jeffrey CoachmanMIS LiasonCommented:
If I am reading you request correctly there is no need to create multiple reports from data in the same table.

Simply create one report with all the data, then simply filter it for the data (department, team member, ...etc) you wish to display.

I believe this is basically what danishani is suggesting, so I'll step aside and let him outline the principles...

;-)

JeffCoachman
0
 
frank_guessAuthor Commented:
Sorry I guess I was not clear.  I have a table with the business cost centers, I need to run a report for each cost center number and save the report as a file with that name example:

Cost_Center_680_5040_05_12_2011_PersonnelRpt.rtf
Cost_Center_680_5022_05_12_2011_PersonnelRpt.rtf
Cost_Center_680_5075_05_12_2011_PersonnelRpt.rtf

These reports go on through over 200 or more business centers.  The table is a list of those cost centers and the reports are created by matching the cost center number against the Cost center number that is listed in the data file that is used to create the report.  Even through the report can be page separated by start the report by the cost center number this does not allow you to create individual reports.  Why am I needing this is to create a folder or directory of individual cost center reports without having to manually run each one and save it myself.  Takes all day that way versus using the table and creating each report without human touch.
0
 
danishaniCommented:
Ok, below link give you an idea on how to do this:

http://bytes.com/topic/access/answers/799273-access-2007-create-report-per-group

Just copy the idea and replace the code to your convenience.

HTH,
Daniel
0
 
Jeffrey CoachmanMIS LiasonCommented:
frank_guess,

Try this sample file:

db352.accdb
0
 
frank_guessAuthor Commented:
I will review and get back to you.  Thanks
0
 
frank_guessAuthor Commented:
That is exactly what I am looking for.  Thanks
0
 
Jeffrey CoachmanMIS LiasonCommented:
;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now