Why form opens behind the one calling it

M

Mary Fran

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.
 
M

Mary Fran

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.
 
Top