Global code
‘I have the following working function:
Public Function sizing(strReportName As String)
Dim Gebinde As Control
Set Gebinde = Forms![FBenchmark]![Gebinde]
Reports(strReportName).FilterOn = True
Select Case Gebinde
Case 1
sizing = strSmall
Case 2
sizing = StrDrums
Case Else
sizing = “”
End Select
End Function
‘On the OnOpen event of the report i have :
sizing (Me.Name)
‘I want to improve my code further and to include the control Gebinde also in the
‘brackets but i do not know how.If i include Gebinde as Control i receive error.
‘If i include Gebinde only in the brackets, then i cannot write properly the
‘OnOpen event of sizing (Me.Name).I alwayd receive errors.
‘May i ask for help?