LotusScript + Subform problems

I’ve been working on a form that references a LotusScript Shared Library for the same routine about 20 times. The triggers are the onFocus and onBlur field events, and I’m programming for the Notes R6.5 client.

Yesterday, I felt that my form was starting to get a little unwieldy, so I pulled some of the sections out of the main form and inserted them into new subforms. I reset the subforms into the main form as “computed subforms” because they only need to be available during specific steps in the workflow and helps eliminate a bunch of cumbersome hide-when statements.

THE PROBLEM: the subforms reference the same LotusScript Library because they use the same routine as the main form, BUT I get a run-time error when opening the document. The run-time error says that there are multiple references to the LotusScript library. If I remove the “Use” statement, then I get a compile-time error when saving the subform because its calling an apparently “non-existing” function.

I suppose I could rip the code out of the Library and place it repeatedly in each form and subform, but I like keeping the my code in one place whenever possible.

Does anyone have any other suggestions? Am I overlooking something obvious here?

-RAM

Subject: LotusScript + Subform problems

These type of errors come when the part of the subforms also use the same script library. One way is to separate the subroutines and functions related to those subforms and use them in appropriate subforms’ “options”. Also remove the Use “ScriptLibrary” from the main form.