Unanswered: Setting and instantiate class on main form
A simple question.
Here is my problem. I would like to set a public class to a main form at the load event in Access and then make a reference to that class to all subform.
My problem is that the loading sequence in access fired the subform before my main form. Is there a way to reverse that so my class on my main form can be set before going to my subform? I hope I am clear.
The "easy" work around is to make the class instance globally available. Could you provide a bit more detail on what this class is and why it needs to be instantiated by the main form? I assume the subform makes some kind of reference to it but the main form sets some properties?
Ok, Here's is my thing. I have a first Form with a list of contracts (number) to produced. It is first loading a list of contract from a query on my Contract table. When the user double-click on the contrat, it is closing the First Form and it bring the number of the selected contract to my class so it can load the information related to my contract on my Main Form and all my subforms.
My problem was that the loading sequence in access was firing the subform before my main Form BUT I have found that I just have to take out the subform name from my subform Object Source. Now it is going to my main form directly.