Ok. I got a little hint about how to do it, but I need some more help with this.
Public Function MyOpenReport( _
strName As String, _
Optional strWhere As String = "")
DoCmd.OpenReport strName, acViewPreview, _
WhereCondition:=strWhere
MyOpenReport =...