Change Font Size in Subreport

A

Alan Z. Scharf

1. I need to change font size in a report and its subreport when the parent
report's page length is > 2.

The portion of the code below for the parent report works.

2. However, the font is not changed for the subreport. The entire report
runs OK with no other error.

3. Can someone tell me the proper way to refer to the subreport in order to
change control font size?

Thanks very much.

Alan

Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As
Integer)
' Reduce font size to 10 from present 11 for all fields if page count >
2

' PARENT REPORT
If [Pages] > 2 Then
Dim ctl As Control
Dim ctlName As String

For Each ctl In Controls
ctlName = ctl.Name
If Me.Controls(ctlName).ControlType = acLabel Or
Me.Controls(ctlName).ControlType = acTextBox Then
Me.Controls(ctlName).fontsize = 10
End If
Next


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SUB REPORT
For Each ctl In Me.srptManagerPerformance.Controls
ctlName = ctl.Name
If Me.srptManagerPerformance.Controls(ctlName).ControlType =
acLabel Or Me.srptManagerPerformance.Controls(ctlName).ControlType =
acTextBox Then
Me.srptManagerPerformance.Controls(ctlName).fontsize =
10
End If
Next

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End If

End Sub
 

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