Link to home
Start Free TrialLog in
Avatar of mlunsford
mlunsford

asked on

Access 2007 forcing one form to have focus and appear in front of another form.

I have an Access 2007 application with two forms.  There is the primary form where the user interacts with the application and there is a secondary form that I open using VBA if the user has not yet entered required information.  I want this form to appear above the other form and have focus so they are aware they need to fill it out.  The form has both 'popup' and 'modal' set to yes.  I have also attempted to use the setFocus method in VBA; however, the form continues to appear behind the first form.
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Seems odd ... is the primary form Modal and Popup ?

mx
Do you have Overlapping selected as the Document Window Options selection (in the Access Options window)?
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mlunsford
mlunsford

ASKER

The primary form is set to popup, but not modal and I do have Overlapping selected.
mlunsford,
tried my suggestion?
You may have to turn off PopOff for the main form.

even if your first form Modal and PopUp properties are set to Yes

opening the second form with the acdialog window mode

DoCmd.OpenForm "form2", , , , , acDialog

will place the second form in front of the first form
That did it, thanks!