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

Draw Report borders w/subreport

Status
Not open for further replies.

jw5107

Technical User
Jan 20, 2004
294
US
Is there a way to draw a border around the subreport and the main report - only when the subreport "has data"???
Below is code that I am working with. What this does is draw line around the subreport when it has data (based on the links between the subrpt & main rpt). The subreport is located in a footer. I need for the border to go from the footer, thru the detail section - to the header. The report is group by a field called AircraftTail, - which like I mentioned, has a footer as well...
Any suggestions or examples...???
Below is what I'm working with..
Thanks in advance...!!!
jw5107

Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
DoCmd.RunMacro "macRepeatSubHeader.MainPH"
Me.DrawWidth = 15
If Me.PartsReqdMAINOOS.Report.HasData Then
Me.Line (20, 0)-Step _
(Me.Width, Me.PartsReqdMAINOOS.Top + Me.PartsReqdMAINOOS.Height + 5), , B
End If
End Sub
 
Don't use a LINE - put the subreport in a RECTANGLE object, and turn the bordercolor to VBWHITE if it (the sub report) has no data..also might want to check into the CanGrow and CanShrink properties.

I've done this in the past, so I know it works.. :)



--------------------------------------
"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
WildHare,
Will this method put a border around the record the subreport matches on the main report as well...??
Thats what I'm shootin' for....
jw5107
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top