Suspen/Resume a routine.

AccessAmateur

Registered User.
Local time
Today, 16:13
Joined
Feb 13, 2003
Messages
30
Ignore last post. I hit the wrong key & it posted before I was finished.
I have two forms. How do I do the following?:
Sub: Event dbl click
Open the 2nd form
Transfer control to the 2nd form so that the user can select a record WITHOUT finishing this routine. ie suspend execution of this routine until the user selects a record in the 2nd form & returns.
On returning control to here, resume execution of this code.
End Sub
This doesn't work although you would think it should:
(yes I know the syntax is wrong)
Sub dblclick
MsgBox "I am here now"
Open Form2
DoCmd.GotoControl Field1 in 2nd form.
MsgBox " I shouldn't get here until control is returned"
MsgBox "but I do"
EndSub
The whole code will execute BEFORE transferring control to the 2nd form.
 
Try hiding the active screen and setting focus on Form2 after you open it.
 

Users who are viewing this thread

Back
Top Bottom