Results 1 to 2 of 2
  1. #1
    TheDeceived is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    8

    Form_Load Events

    I've just come across probably the most frustrating thing in Access so far, and it has cost me about an hour of day, so apologies if this post comes across in an aggressive manner.



    I'm currently asking a form to load different subforms into a child frame dependant on a button click from the user.

    When they click the button, it changes the SourceObject of the child frame to that of the form I want it to load. From there, I'm using the Form_Load event within each of the subforms to update certain things on screen (such as labels, combo boxes etc).

    In total, I have three different forms I am loading onto the child frame. Two of those forms only update values on the main form (i.e. no changes are made to the form that is being loaded), whereas the other form updates a few values within itself and then updates the main form.

    Can anybody explain why on Earth you have to change something on the form that is loading for it to process the rest of the code? I just cannot understand why Microsoft would do this :S

    If I don't change something to the subform that is being loaded before I make changes to the main form, then it just completely ignores the Form_Load event. However, if I put a line like...

    Code:
        Me.AllowEdits = True
    ...then it steps into the Form_Load event and processes any further code beyond that point.

    Why?! Argh!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Welcome to Event Driven Software. In this case those events are driven by the person sitting at the keyboard and not the programmer who is in complete control of the machine at all times. Have you considered using a Tab Control without the tabs visible? The effect is probably the same but almost everything takes place on the MainForm. You can activate whatever you want as you switch tabs.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combining events
    By daddylongtoe in forum Access
    Replies: 4
    Last Post: 06-25-2010, 02:55 AM
  2. Events Procedure Question..
    By Procom Webserve in forum Access
    Replies: 16
    Last Post: 12-07-2009, 10:13 AM
  3. form events
    By EinSpringfielder in forum Programming
    Replies: 1
    Last Post: 08-26-2009, 11:01 AM
  4. Timed events
    By summitrider in forum Access
    Replies: 2
    Last Post: 08-14-2008, 04:38 PM
  5. Events Report, please help!
    By Suzan in forum Reports
    Replies: 3
    Last Post: 04-19-2006, 01:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums