Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you print a multi-copy report from a form? Please 1

Status
Not open for further replies.

rafe

Technical User
Aug 18, 2000
194
US
I’m trying to print a multi-copy report from a form. These reports replicate certain multi-copy bureaucratic forms on n-part colored cabonless copy paper.

You select the forms to print with a multi-select list box. After some checking & processing I try to do the following:

Select Case actOpt.Value
[tab] Case 1: 'Print
[tab][tab]'mark records for printing
[tab][tab]For Each docPtr In docList.ItemsSelected
[tab][tab][tab]rsDoc.Find "[DocID] = " & CStr(docList.Column(0, docPtr))
[tab][tab][tab]rsDoc![Action] = True 'flag for report query
[tab][tab][tab]rsDoc.Update[tab][tab][tab]'post changes
[tab][tab][tab]rsDoc.MoveFirst[tab][tab] 'so next search starts at begining
[tab][tab]Next
[tab][tab]'print records
[tab][tab]On Error GoTo Err_act_Click
[tab][tab]'DoCmd.PrintOut , , , acHigh, 2, False <<<<<<<Only prints current screen
[tab][tab]DoCmd.OpenReport &quot;CheckReq&quot;, acNormal <<<Only prints one page
[tab][tab]'deselect records


Maybe some out there has tried to do the same thing?

Thanks for any help you can give in advance.

rafe
[sig][/sig]
 
A few questions/comments. Have you checked that your code is actually setting the Action field for the correct records? When you run the query for the report, does it pull up the records with the Action field set True?

I am not sure why you are trying to print the form. Printing forms in Access is never a good idea. Forms can be thought of as on-line reports; printed reports should be produced using Report design.

[sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Kathryn,

first, thanks for the speedy reply. sorry i wasn't clear

yes the action field change works correctly.

i agree 100% that i should print a report & not a form. which is what i'm trying to do from a form

i'm trying to print an already created report by selecting items on a form. the report was designed 1st and now i'm trying to select which documents to print to by using the some program logic so i'm only showing unprinted documents
in a multi-select list box for the final document selection.

before i was manually clicking on the document table document records' action fields in the table view to select the documents to print on a report. then i've been going to the file/print dialog box to select the needed # of copies of (& w/o collating)


the DoCmd.OpenReport &
DoCmd.PrintOut
don't allow me to print mutiple copies of a report. or do they & i'm not using them correctly?

anyway, i've noticed that your really good at helping people with access. thanks again

rafe [sig][/sig]
 
DoCmd.printout should work and does let you set number of copies, but the report has to be the active object. Have you tried opening the report in acPreview mode and then using the docmd.printout?

I am out of the office until next Tuesday, so I hope this works! If not, I'll get back to you then. [sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
yes!

Kathryn you are correct. the correct sequence should be...

DoCmd.OpenReport &quot;CheckReq&quot;, acPreview
DoCmd.PrintOut , , , acHigh, 2, False
DoCmd.Close acReport, &quot;CheckReq&quot;

thanks lots & enjoy your time away from the office

rafe
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top