Problem Opening a Form from a Report

G

Guest

I have a form with unbound text boxes on it to hold the selection parameters
for a report. The form is opened by the reports OnOpen event (DoCmd.Open form
"frmParameter", acNormal, "", "", acEdit, acDialog)
My problem started when I added a button to the form opening a second lookup
form. When I only open the form the second form opens on top of the parameter
form and I can perform the lookup and close the lookup form, it all works
fine. BUT when I open the parameter form through the reports OnOpen event the
lookup form opens behind the parameter form and never gets the focus. What am
I doing wrong?
 
L

Lynn Trapp

The acDialog parameter is setting the form to a modal form. A modal form
will always have the focus. If you remove that parameter it should work as
you expected.
 
G

Guest

You could also set the 'popup' and 'modal' properties of the lookup form to
true which would force it to the top as well.
 

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