Report not opening on top

E

Eric C

Hello,

When I open a certain report I created, it opens behind
the current form. I need this report to be on top, until
it is closed by the user. How do I go about doing this.
My code is:
DoCmd.OpenReport "schTEACHERLISTACTIVEBYSCHOOL",
acViewPreview, , , acWindowNormal

Thanks,

Eric
 
F

fredg

Eric said:
Hello,

When I open a certain report I created, it opens behind
the current form. I need this report to be on top, until
it is closed by the user. How do I go about doing this.
My code is:
DoCmd.OpenReport "schTEACHERLISTACTIVEBYSCHOOL",
acViewPreview, , , acWindowNormal

Thanks,

Eric
Eric,
Just make the form not visible.
DoCmd.OpenReport "schTEACHERLISTACTIVEBYSCHOOL", acViewPreview
Me.Visible = False

You can then either close the form

DoCmd.Close acForm, "FormName"

or make it visible again

forms!FormName.Visible = True

from the report's Close event.
 
D

debbie

Try ending with acViewPreview - this will use the default
settings:
DoCmd.OpenReport "schTEACHERLISTACTIVEBYSCHOOL",
 

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