Activate Event question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Salad

    #1

    Activate Event question

    I have a form with a few command buttons. These command buttons open forms.

    In the OnActivate event of the main form I put in the line
    msgbox "Activate"

    When I press a button to open a form, close the opened form, I get the
    message "Activate"...ex cept for one. All of the called forms have the
    syntax
    Docmd.Openform "FormName"
    with no arguments.

    All opened forms are closed with
    Docme.Close acForm, "CurrentFormNam e"

    Is there any reason you can think of that the one form, when closed,
    does not "activate" the main form? The only difference between it and
    the other forms is that it is unbound and has 2 subforms in it. The
    others are forms are unbound with a datasheet subform inside it.
  • MLH

    #2
    Re: Activate Event question

    Experiment with the order in which the order in which you
    close one and open another. Reverse that to open the other
    then close the one. Observe what happens when you do that.

    Take a moment to explain a tiny bit more. Take care to tell us
    on which form a button you say you're clicking resides - stuff
    like that - just to eliminate unnecessary ambiguity.

    I read it to mean you have a main form, a current form and a
    desired form. Current form is open because of a button click
    you made on main form. Desired form is about to be opened
    because of a button click you're about to make on current
    form?

    Comment

    • Salad

      #3
      Re: Activate Event question

      MLH wrote:[color=blue]
      > Experiment with the order in which the order in which you
      > close one and open another. Reverse that to open the other
      > then close the one. Observe what happens when you do that.[/color]

      I "discovered " the reason. I thought I'd check out the Cycle property
      of my forms and learned I had set the Popup/Modal property of the form
      in question to Yes. I guess since it is a popup/modal, it is "part" of
      the main form...almost like a subform doesn't "activate" since it's
      parent is the main form.

      Since there was no reason for it to be popup/modal, the problem is solved.

      Comment

      • MLH

        #4
        Re: Activate Event question

        Glad U-found it. That kind-a-crap happens to me all the time.
        Any full featured program, though providing MANY tools for
        you to do unique and wonderful things is providing sneaky
        hiding places where all kinds of things the you didn't necessarily
        intend can hide.[color=blue]
        >
        >I "discovered " the reason. I thought I'd check out the Cycle property
        >of my forms and learned I had set the Popup/Modal property of the form
        >in question to Yes. I guess since it is a popup/modal, it is "part" of
        >the main form...almost like a subform doesn't "activate" since it's
        >parent is the main form.
        >
        >Since there was no reason for it to be popup/modal, the problem is solved.[/color]

        Comment

        Working...