It must be a syntax problem (I think). But as soon as I get to the line of code to cycle thru the controls on the subreports, I get an error
If someone could simply correct it for me (PLZ)
With many thanks in advance
Code:
Public Sub ToggleProperties(rpt As Report, wFontWeight As Variant, wForeColor As Variant, wFontItalic As Variant)
Dim ctl As Control
For Each ctl In rpt.Controls
Select Case ctl.ControlType
Case acTextBox
If (rpt.Visible = True) Then
ctl.FontWeight = wFontWeight
ctl.ForeColor = wForeColor
ctl.FontItalic = wFontItalic
End If
Case acSubform
'this is the line of code that throws the error
Call ToggleProperties(rpt(ctl.Name), wFontWeight, wForeColor, wFontItalic)
End Select
Next ctl
End Sub