Hmmm - In that case, I’m not sure what to suggest.
Is the form unavailable to you for editing? Or are you trying to do some general purpose coding that will apply to all forms, or something like that?
If the form is unavailble for editing but a subform is, you can always call the function from a subform instead as long as you know the subform will always be loaded in the document.
And how, pray, is the code supposed to run if it has no “load and run me” context? On Event works IF the code is loaded – say, in the form Globals. If it’s just lying there, dormant, in a script library, then it will never run. There was a great article in what was then Iris Today (then LDD Today, then, poof!!!) that did pretty much exactly what you’re describing. The point of the article was OOP in LotusScript, but the example was an extended Notes UI document class where all of the form events were overriden using On Event. (The article was by Andre Guirard. If anyone knows where it might be living, the URL would be much appreciated.)
Your response is nonsense. Of course a library requires a “use” statement at some level.What I wanted to do was put all the event-handling in place with only the Use statement. It appeared to be unreliable on new documents, so I had to add some code to the QuerySave event.
I guess what I was asking was whether or not you are certain that the Sub Initialize in your library is taking place in the Initialize event of the form – the overwrite should happen, but is it actually happening?