Form_Current() getting called automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • questionit
    Contributor
    • Feb 2007
    • 553

    Form_Current() getting called automatically

    Hi

    I am finding it difficult to use Form_Current() event of a subform.

    It gets called automatically. I changed the tab order so that the Sub Form with Form_Current() event came first or in the end in the order; but this doesn't resolve the problem.

    Interestingly, if one of the controls on the form gets focus, the Form_Current() gets called.

    Any idea how to get rid of this?

    Thanks
    qi
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    I suggest you read the help on these events QI (type in current then hit F1 for context-sensitive help). It seems your understanding of the whole process is off so you're getting confused (in an area which is admittedly quite complex). read up on what is triggered when and you will have a much better understanding of why things happen.

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      It would be nice when you would describe the "problem", as the OnCurrent event is always executed (both for the main-form and for the sub-form), thus only usefull for "single record bound" processing.

      Nic;o)

      Comment

      • questionit
        Contributor
        • Feb 2007
        • 553

        #4
        Ok Thanks... i wasn't expecting Form_Current to behave in this manner. More study of this event has cleared up the confusion now.

        qi

        Originally posted by nico5038
        It would be nice when you would describe the "problem", as the OnCurrent event is always executed (both for the main-form and for the sub-form), thus only usefull for "single record bound" processing.

        Nic;o)

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32661

          #5
          That sounds like a good answer Qi.
          Glad you understand things better now (much better than simply getting past an individual problem :))

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #6
            Originally posted by questionit
            Hi

            I am finding it difficult to use Form_Current() event of a subform.

            It gets called automatically. I changed the tab order so that the Sub Form with Form_Current() event came first or in the end in the order; but this doesn't resolve the problem.

            Interestingly, if one of the controls on the form gets focus, the Form_Current() gets called.

            Any idea how to get rid of this?

            Thanks
            qi
            The Current() Event of a Form does not fire when Controls on the Form receive the Focus. This would only happen when the Form is initially opened, and a Control has a Tab Index = 0 (1st Control to receive the Focus). This is the Current() Event of the Form firing, not the GotFocus() Event of the Control.

            Comment

            Working...