Pop Up behind Normal Form

G

ggregg

I open a Main form in Normal mode. A button on the form opens a Pop up form
in Dialog mode. The Pop up and Modal properties are set to yes for the Pop
up form. Most of the time it works fine, but once in awhile the Pop up form
ends up behind the Main form. Does anyone have any suggestions on what could
cause that? Thank you very much.
 
A

Arvin Meyer [MVP]

Timing. If code is being upstaged by another application, it can take longer
to run and the focus doesn't leave the Main form. Just add some code to the
routine which ends by setting focus back to a control on the popup. (or
visa-versa, if that's what you want).
 
G

ggregg

I thought this problem was fixed, but I have tried all combinations of Set
Focus, Dialog mode, Pop up and Modal properties and the problem is still
occurring.
The user has told me that the only other application he has running may be
email.

The Pop up opens from the Main form and information needs to be entered into
it before any other code is executed. At what point would I use the SetFocus
command and what combination of properties would you recommend?

I appreciate any suggestions. thank you
 
G

ggregg

I have finally fixed the problem and it had nothing to do with the Pop Up form.
It was my VBA code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top