×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

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


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

Thanks for any help you can give in advance.

rafe

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

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.

Kathryn


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

(OP)
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

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

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.

Kathryn


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

(OP)
yes!

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

DoCmd.OpenReport "CheckReq", acPreview
DoCmd.PrintOut , , , acHigh, 2, False
DoCmd.Close acReport, "CheckReq"

thanks lots & enjoy your time away from the office

rafe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close