Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    23

    Question 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.

    Thanks

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    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?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2003
    Posts
    23

    Thumbs up Case close

    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.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •