Suppress Second Page

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi Folks - I have a report with a few fields: ProductID, ProductName,
ProductDescription, ProductImage. The report displays the product info.
There is NOT always a picture with the product. Here's my dilemma: If the
product HAS a picture, I want to generate a second page for that record with
the picture displayed. If there is NO picture, (ProductImage Is NULL), then
I want to suppress the second page and go to the next record. Any thoughts?
Thanks in advance.

Michael
 
Mike:

Put the image and page into a separate report group footer; you can group on
the product id. Put a page break at the top of the group footer section to
force a new page. Then in the On Print event of the group footer add code
like this:

If IsNull(Me!YourImageControlName) Then
Me.PrintSection = False
Me.MoveLayout = True '<-Advance to the next print location
Me.NextRecord = True
End if

Hope that helps
 
Back
Top