Printing Seperate Records

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I know that you can print each record seperatly, but I also need to have
each record go to a different printer? Anyone know how this might be done?
Thanks
DS
 
Allen said:
In Access 2002 or 2003, you can set the Printer object before you
OpenReport.

In earlier versions, it is more involved. For Access 2000, see:
http://www.members.shaw.ca/AlbertKallal/msaccess/printch2k.zip
of for A97:
http://www.members.shaw.ca/AlbertKallal/msaccess/printch97.zip
OK. I have the report set up....Each record represents a different
printer, can I do this?

If [Printer}=1 Then
Print to 1

but I need it to be open ended because everytime I add a printer I don't
want to add a line to the code, I also don't want to make a new report
everytime I add a new printer. ANY HELP is appreciated!!!
Thanks
DS

PS...these printers will all be on the Network so any computer can
access them.
 
DS said:
Allen said:
In Access 2002 or 2003, you can set the Printer object before you
OpenReport.

In earlier versions, it is more involved. For Access 2000, see:
http://www.members.shaw.ca/AlbertKallal/msaccess/printch2k.zip
of for A97:
http://www.members.shaw.ca/AlbertKallal/msaccess/printch97.zip
OK. I have the report set up....Each record represents a different
printer, can I do this?

If [Printer}=1 Then
Print to 1

but I need it to be open ended because everytime I add a printer I don't
want to add a line to the code, I also don't want to make a new report
everytime I add a new printer. ANY HELP is appreciated!!!
Thanks
DS

PS...these printers will all be on the Network so any computer can
access them.
OK I'm getting closer. Here is what I have. It's really rough!

DoCmd.OpenReport PrepSlip, acNormal
DoCmd.GoToRecord , , acFirst
Application.Printer = [PrinterID]
DoCmd.RunCommand acCmdPrint
DoCmd.GoToRecord , , acNext
Application.Printer = [PrinterID]
Loop
Untill
Last Record
End Loop
Application.Printer = Nothing

The report opens, you go to the first record, the printer is choosen
from the PrinterID control on the report, it prints, ot goes to the next
record and repeats untill there are no more records. I'm sure there are
holes in this, so any help is appreciated.
Thanks
DS
 
Allen said:
That's the basic idea.

You have to set Application.Printer *before* opening the report, so you need
to set it for each record before opening the report for that record, which
looks like the tac you are taking.
Hi Allen,
The problem is that I don't know what printer is going to be useduntill
the report opens. Is there another way to do this? I need to open the
report, go to the first record, the printer is choosen from the value in
the PrinterID of that record, print it, then if any go to the next
record and continue to do so untill the end of the record set.

Thanks,
DS
 
For direct printing (not preview), you must set the Printer object before
opening the report.

That probably means using something like a DLookup() on the record to be
printed to get the appropriate printer before you OpenReport.
 
Allen said:
For direct printing (not preview), you must set the Printer object before
opening the report.

That probably means using something like a DLookup() on the record to be
printed to get the appropriate printer before you OpenReport.
Thank you Allen, I'll continue my Quest. I set It up in the meantime
with seperate reports, but that means everytime the client adds a new
printer I have to make a new report. This s why I'm trying to do it from
one report and just print the records to different printers as opposed
to makin a new report. I will try the DLookUp suggestion. Once again,
Thank You.
DS
 
Back
Top