SubForm OnExit Event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helm
    New Member
    • Mar 2007
    • 26

    SubForm OnExit Event

    Folks,

    I'm trying to interrupt an OnExit event if the user clicks on a particular control. Frankly not sure if the OnExit event allows this. Here's the position:-

    There's a main and sub form. I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit. The OnExit event does some processing for all the records on the subform. Part of this processing tells the user that there are one or more incomplete records and that's OK if the user wants to click one of several buttons on the main form that process the subform data in various ways but not if they try to change the main form record (the Main Form uses a date field tied in with a Calendar Control).

    What I'd really like to do is, under the OnExit, event, is give a warning message if they go to some controls on the main form but not others.

    Happy to post the current code if that helps and TIA for any help on this. I'm currently using Access 2002 and Win XP.

    Regards

    Helm
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by helm
    Folks,

    I'm trying to interrupt an OnExit event if the user clicks on a particular control. Frankly not sure if the OnExit event allows this. Here's the position:-

    There's a main and sub form. I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit. The OnExit event does some processing for all the records on the subform. Part of this processing tells the user that there are one or more incomplete records and that's OK if the user wants to click one of several buttons on the main form that process the subform data in various ways but not if they try to change the main form record (the Main Form uses a date field tied in with a Calendar Control).

    What I'd really like to do is, under the OnExit, event, is give a warning message if they go to some controls on the main form but not others.

    Happy to post the current code if that helps and TIA for any help on this. I'm currently using Access 2002 and Win XP.

    Regards

    Helm
    I'm looking at the OnExit event of the subform which offers just two events - OnEnter and OnExit.
    These 2 Events are NOT Events related to the Sub-Form since Controls have an Exit Event, whereas Forms do not. These Events are related to the Sub-Form Control itself which actually contains the Sub-Form. To see what the actual Sub-Form is: Select the Sub-Form Control ==> Properties ==> Data Tab ==> Source Object. This Source Object is the Sub-Form and it has approximately 24+ Events associated with it as does all Forms. Another way to access the properties of the Sub-Form itself is to Click on the little square in the Upper Left Corner of the Sub-Form Control ==> View ==> Properties. Of course you can always open the Sub-Form in Design View in the Database Window. Please be a little more specific about what you are trying to accomplish, I'm sure someone here can help.

    Comment

    • helm
      New Member
      • Mar 2007
      • 26

      #3
      ADezzi,

      My apologies for this tardy response to your response. I'd expectd an email along the lines 'someone has responded to your post'. My fault entirely.

      I did as you suggested and concluded that the answer to my problem was to set a test for each control that the user might select and take action accordingly (rather than to seek to do this inside the OnExit event.

      Thanks and apologies again.

      Regards, Helm

      Comment

      Working...