Results 1 to 3 of 3

Thread: [RESOLVED] [2005] form load event not being executed

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    115

    Resolved [RESOLVED] [2005] form load event not being executed

    I have 2 forms, form2 is loaded by a call in form 1 to the show method. Form2 loads but a lot of the code is not being executed including the load event. If I add a click event it executes?

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    115

    Re: [2005] form load event not being executed

    Found solution on thescripts.com. I must of accidentally screwed up the event handlers, probably by cutting and pasting.

    Followed this and resolved:

    The simplest solution is to

    1) remove your load handler.
    2) Double click on the form body to add a new load handler - with the
    correct event/handler assoc.
    3) copy the code from your routine to the new one

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] [2005] form load event not being executed

    No, the simplest solution is to just add "Handles Me.Load" to the end of the method declaration.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width