Hi there,
I've got a code sample below from a report from a computer database
that I have built with a printer subtable, which in turn generates a
printer subreport that I'm trying to put on its own page (one page has
hardware, one has software, one if necessary has the printers...not
every machine has a printer).
The subreport is contained within a group footer, which by default has
ForceNewPage set to "None" and Visible set to "Yes".
The code sample follows:
Current_ID = Me.Computer_ID
SQL_Query = "Select Count (Printer_ID) as Printer_Count from
Printers where Attached_To = " & Current_ID
Set recTmp = dbTmp.OpenRecor dset(SQL_Query)
Printer_Count = CLng(recTmp!Pri nter_Count)
Bool_Check = Abs(Printer_Cou nt 0)
Me.Printer_Subr eport_Footer.Vi sible = Bool_Check
Me.Printer_Subr eport_Footer.Fo rceNewPage = Bool_Check
The problem is that the .Visible property works exactly as I intended
it to (i.e. displaying the individual subreport footer if there are
printers for the Computer_ID, and not displaying the subreport footer
if there are no printers for Computer_ID); however, .the .ForceNewPage
property affects ALL of the subreport footers as a whole, rather than
each individual one that I want.
If I remove this line of code, I get a blank page at the end of my
report.
HELP!
Thanks.
Adam
http://www.searchenginefriendlylayouts.com/