Hi,
I want my code to open a form, then halt until the form closes. I thought that opening the form in dialog mode would do this. However, for example, when I run a test like:
DoCmd.OpenForm "msgboxauto", , , , , acDialog
MsgBox "This is the regular msgbox"
Both the msgboxauto form and the regular msgbox show up at the same time. In fact, the msgbox seems to take precedence; I can't do anything else until I close the msgbox.
Am I misunderstanding something?
If I run this instead:
DoCmd.OpenForm "msgboxauto", , , , , acDialog
docmd.openform "SomeOtherForm"
MsgBox "This is the regular msgbox"
It seems to work like I expect. So is it just something weird with msgbox, or what???
My purpose here is to have a form "msgboxauto" work like a msgbox but close automatically after a given period of time. This is to keep my app from hanging because someone forgot to click "OK" in a msgbox. I thought making it a dialog box was the way to go, but....???
I want my code to open a form, then halt until the form closes. I thought that opening the form in dialog mode would do this. However, for example, when I run a test like:
DoCmd.OpenForm "msgboxauto", , , , , acDialog
MsgBox "This is the regular msgbox"
Both the msgboxauto form and the regular msgbox show up at the same time. In fact, the msgbox seems to take precedence; I can't do anything else until I close the msgbox.
Am I misunderstanding something?
If I run this instead:
DoCmd.OpenForm "msgboxauto", , , , , acDialog
docmd.openform "SomeOtherForm"
MsgBox "This is the regular msgbox"
It seems to work like I expect. So is it just something weird with msgbox, or what???
My purpose here is to have a form "msgboxauto" work like a msgbox but close automatically after a given period of time. This is to keep my app from hanging because someone forgot to click "OK" in a msgbox. I thought making it a dialog box was the way to go, but....???