Turning off a subreport's title

K

Keith

I have created a report that contains a subreport.
Everything looks fine except the subreport title is
printed about 4 lines down on top of the subreport. Is
there a property that will make this title invisible?
 
J

Jesse Avilés

In the subreport window (design view), go to view and
deselect the page header/footer and the report
header/footer. Careful with this as any controls in the
header and footer will be deleted. If you dont want
that, you can use code to change the font site and color
so that the controls will be invisible. You can use the
IsLoaded function from the sample developers database on
microsoft (http://msdn.microsoft.com/library/en-
us/bapp2000/html/mdbdownload.asp) to determine if the
report is called from a form that will not need the
header printed (use the report on open event). If the
function returns true, you can set the following
properties with a With statement.

Sub ReportName_On_Open
On Error GoTo ErrorHandler

If IsLoaded FormName = True Then
With TextBoxName
.Fontsize = 2
.Visible = False
End With
Else
Exit Sub
End If

ErrorHandler:
MsgBox "Error#: " & Err.Number & vbCrLf &
Err.Description
Exit Sub

End Sub

It will work better if the Can Shrink property for the
control is set to Yes.

Jesse Avilés
(e-mail address removed)
http://home.coqui.net/monk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top