Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Thu Jun 3 10:33:59 CDT 2004
Dear List: I am trying to set a variable rpt to a sub report in a Public function (this is for purposes of translating the labels to a foreign language). I am passing the report name to the function in the Report_Open event. Setting it to the Main report is no problem. Public Function TranslateControlReport(argReport As String) As Boolean Dim rpt As Report Set rpt = Reports(argReport) works fine. But in the _Open event of the sub-report when I pass the name of the sub-report to this routine I get a run time error 2451 - the report name you entered is misspelled or refers to a report that isn't open or doesn't exist. I think it has to do with the fact that I'm only passing the sub-report name and have to qualify it with the Main report? But I've tried several syntaxes with no luck. Anybody know? MTIA Rocky Smolin Beach Access Software http://www.e-z-mrp.com But