Why form opens behind the one calling it

G

Guest

I can't seem to understand why a form I am open in the AfterUpdate event of a
combo box opens "behind" the original form which is not pop-up or modal. My
code to open it is " DoCmd.OpenForm "frmIdenticalParts", , , "[Part
Number]='" & Me!SearchParts & "'" - I thought all forms opened "on top" of
previously opened ones. Also, the original one is acting like it's modal in
that I can't put the focus on the new one unless I close the original one.
What am I missing? Thanks.
 
O

OfficeDev18 via AccessMonster.com

Check the open command for the original form. If it reads "acDialog", it's
the same thing as modal.

You therefore have two choices: change the 'acDIalog' parameter, or manually
close the original form after it opens the second one.

HTH

Mary said:
I can't seem to understand why a form I am open in the AfterUpdate event of a
combo box opens "behind" the original form which is not pop-up or modal. My
code to open it is " DoCmd.OpenForm "frmIdenticalParts", , , "[Part
Number]='" & Me!SearchParts & "'" - I thought all forms opened "on top" of
previously opened ones. Also, the original one is acting like it's modal in
that I can't put the focus on the new one unless I close the original one.
What am I missing? Thanks.
 
S

Steve Schapel

Mary,

I gather the original form's Modal and Popup properties are set to No.
However, there could be code or macro on that form's Open event, for
example, or on the event which opens that form, for example...
DoCmd.OpenForm "OriginalOne", , , , , acDialog
.... which is resulting in this behaviour.
 
G

Guest

That was it - it was in the code that opened the original form - thanks for
your help!

Steve Schapel said:
Mary,

I gather the original form's Modal and Popup properties are set to No.
However, there could be code or macro on that form's Open event, for
example, or on the event which opens that form, for example...
DoCmd.OpenForm "OriginalOne", , , , , acDialog
.... which is resulting in this behaviour.

--
Steve Schapel, Microsoft Access MVP


Mary said:
I can't seem to understand why a form I am open in the AfterUpdate event of a
combo box opens "behind" the original form which is not pop-up or modal. My
code to open it is " DoCmd.OpenForm "frmIdenticalParts", , , "[Part
Number]='" & Me!SearchParts & "'" - I thought all forms opened "on top" of
previously opened ones. Also, the original one is acting like it's modal in
that I can't put the focus on the new one unless I close the original one.
What am I missing? Thanks.
 

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

Top