PC Review


Reply
Thread Tools Rate Thread

Printing all reports

 
 
=?Utf-8?B?Tm92aWNlSWFu?=
Guest
Posts: n/a
 
      9th Nov 2005
Hi,

I have a parameter query which fuels a report. When the report is run it
prompts for a staff number. We generally only print one or two reports but
every so often we have to send all reports to HQ.

How can I print all staff training records?

Ian
 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      9th Nov 2005
Hi Ian
First remove the parameter query from the report so it wont prompt you every
time you need to print the report.
Change it to a select query that returns all records
Select * From TableName

Use the Wherecondition of the OpenReport command line, to filter the report
and print a report for each staff member
================================================
Dim MyDB As Dao.DataBase , MyRec As Dao.RecordSet
Set MyDb = currentDb
' open the staff table
Set MyRec = MyDb.OpenRecordSet("Select * From [Staff Table Name]")
' start loop through the record, to print a report for each staff member
While Not MyRec.Eof
' Print the report
Docmd.OpenReport "Report Name",,, "[Staff field Name] = " & MyRec![Staff
field name in the staff table]
MyRec.MoveNext
Wend
===============================================
If the field that is used to filter the report is string type, then change
the Command line to
Docmd.OpenReport "Report Name",,, "[Staff field Name] = '" & MyRec![Staff
field & "'"

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


"NoviceIan" wrote:

> Hi,
>
> I have a parameter query which fuels a report. When the report is run it
> prompts for a staff number. We generally only print one or two reports but
> every so often we have to send all reports to HQ.
>
> How can I print all staff training records?
>
> Ian

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing 2 reports with different image backgrounds as 1 print job to allow duplex printing ghadley_00@yahoo.com Microsoft Access Reports 0 31st Dec 2005 04:14 PM
Microsoft Speech Recognition repeating error "all all all all all all...." kenrosen@gmail.com Windows XP General 1 17th Dec 2005 03:22 AM
Microsoft Speech Recognition repeating error "all all all all all all...." kenrosen@gmail.com Windows XP Help 0 16th Dec 2005 07:39 PM
Trouble with all reports all databases Neil Microsoft Access Reports 0 9th Feb 2004 03:32 PM
Combo box to select printing reports for all clients or just one... Bayou BoB Microsoft Access Forms 1 4th Dec 2003 07:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:28 AM.