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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print record twice when If then else statement applies.

Status
Not open for further replies.

LTillner

MIS
Apr 23, 2002
96
0
0
US
I have a report that is a single page of labels (4 labels per page for the same record). If their enrollment for any grade is above 200 I want the page of labels to print twice (so they would receive 8 labels rather than just 4).

How can I write this into my report?

My pseudo-code is:

If grade3 > 200 or grade4 >200 or grade5 > 200 or
grade6> 200 or grade7 > 200 or grade8 > 200
then
Docmd.OpenReport returnlbl, ....
els
Docmd.OpenReport returnlbl, ....
End If

where the ....'s are I need help finishing the command.

There are 1592 records, is there a better way to run this? I can't group on the number of labels needed because I've already grouped and sorted on a unique id field that I need the labels to come out in the order of.

Thanks for any help!

Lynette
 
can you not just say
Code:
If grade3 > 200 or grade4 >200 or grade5 > 200 or grade6> 200 or grade7 > 200 or grade8 > 200 then 
   Docmd.OpenReport returnlbl, acViewNormal
   Docmd.OpenReport returnlbl, acViewNormal
else
   Docmd.OpenReport returnlbl, acViewNormal
End If

this will send the print jobs directly to the printer without you viewing the report. I put the line in there twice so it will print twice for above 200.


-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top