Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: Sequence of form events

    From a listbox after update event I open another form. This form is modal & can only be exited by pressing one of 2 command buttons. These call a global function that sets a global variable to true or false.
    The code in the original form then interrogates this variable to ascertain which command button was clicked.
    But, when I step thru the code, the statement after the form open command is executed before the click event code in the secondary form.

    The code in my primary form is:
    stLinkCriteria = "[ItemUniq]=" & Forms("frmItemSearch").[lstItemSrch].Column(2)
    DoCmd.OpenForm "frmRecentTestDetails", , , stLinkCriteria
    If GetContinue() Then
    I tried a set focus, but the "If GetContinue() Then.." still gets executed before the click events in frmRecentTestDetails

    Why is this, & how can I force it to do what I want ??

  2. #2
    Join Date
    Nov 2003
    Set the PopUp property for your second Form to Yes and leave the Modal property at Yes as well.

    The line:


    is not needed.

    hope this helps...

Posting Permissions

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