Using Foreach to print reports

  • Thread starter charles.kendricks
  • Start date
C

charles.kendricks

I have a report (emp. time sheet) that needs to be printed out for
each employee. I have the code to print each report individually,
however I don't know how to use the foreach statement to print them
all from one procedure. I want to use my salary table, which only has
two fields, UserName, and HourlyRate as the source of my usernames to
plug into the foreach statement, I then plan to wrap this around my
existing code which prints out the reports individually. How do I
plug the UserNames into the foreach statement, I know this should be
extremely simple.
 
?

=?ISO-8859-1?Q?Vladim=EDr_Cvajniga?=

Instead of For Each I'd recommend to create a report section (employee ID)
and add page break (ForceNewPage) after the section. Section will contain
all necessary information about one employee.

Vlado
 
S

storrboy

Instead of For Each I'd recommend to create a report section (employee ID)
and add page break (ForceNewPage) after the section. Section will contain
all necessary information about one employee.

Vlado



You could then use the WHERE argument of the Docmd.OpenReport method
to restrict records to specific employees when required. Reducing it
all into one report instead of one for every employee.
 
?

=?ISO-8859-1?Q?Vladim=EDr_Cvajniga?=

Yes! Also see "Pick list for report" - a post in this thread by ksr (March
5th 2007 1:40).


"storrboy" <[email protected]> píse v diskusním príspevku
Instead of For Each I'd recommend to create a report section (employee ID)
and add page break (ForceNewPage) after the section. Section will contain
all necessary information about one employee.

Vlado



You could then use the WHERE argument of the Docmd.OpenReport method
to restrict records to specific employees when required. Reducing it
all into one report instead of one for every employee.
 

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

Similar Threads


Top