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 ??