Report to front

  • Thread starter Thread starter D B Lawson
  • Start date Start date
D

D B Lawson

Guest
Can anyone give me a solution to this. When I preview a report from a dialog box, when the dialog box closes, the report drops to the back of the forms and you have to go hunting for it. How can I get the report to stay on top? This only happens when it's printed from the dialog box.

Thanks
 
One solution might be to set the reports POP UP property to YES.
 
I haven't tried this as I don't have an example to test on but have you tried maximising the report on open? It may also be that as the form you are opening from is modal you have not yet closed it when the report opens, try switching the two lines of code around that open the report and close the dialog.

Ian
 
Thanks for the suggestions. I'll give them a try and let you know.

Dawn
 
Thanks for the suggestions but as always with me, things are never easy. I couldn't find a pop-up setting for the report, maybe I'm looking in the wrong place.

Maximizing the report on open didn't work unfortunately.

The user has to select a client entry from the dialog box and then the report opens for that client's record. It means that if I close the dialog box first, it can't find the client's record.

I even tried

If DialogBox.visible = true
Then DialogBox.Visible = false

on the onopen event of the report which worked in that the report came to the top. Unfortunately the report can be called from another form and the report still looks for the dialog box on opening and if it can't find it there's an error message. The If part of the statement doesnt' seem to work.

Willing to try any other suggestions!

Thanks for your time, as always
 
Use a pop up form as the dialogue box, toggle its visibility when opening the report.
 
Hi Rich

My dialog box is set to pop-up and modal. This is what I have on click event of the print button for the dialog box:

DoCmd.OpenReport stDocName4, acPreview
DoCmd.Close acForm, "frmPrintDialogWorksheetForm"

Should I be doing something else?
 
How about using the OnClose of the form to set the focus on the report?
 
DoCmd.OpenReport stDocName4, acPreview
Forms!frmPrintDialogWorksheetForm.Visible=False

Use the Close Event of the report to close the form.
HTH
 
Thanks for all the help but no luck, I'm afraid. Tried your second suggestion Rich but the report still drops to the back. They'll just have to get use to searching for the report!
 
Your report should have a Pop-Up property, In design view of your report, View properties, click on OTHER tab and there should be the Pop-Up property, set it to YES and Save the report. I guess it should work.

Good luck
 
Your first post says to the back of the Forms, are there other forms open at the same time?
 
Hi there. I've double checked and I can't find a pop-up option in the report properties. I'm using A2K, don't know if that makes a difference.

There are six menu forms which are open all the time, along with whatever form the pop-up form is called from. I have a print button on the form which calls the pop-up form. The user selects the report they want to print from the pop-up and then clicks print. The selected report opens in preview but drops behind any other forms that are open. If I print the report straight from the main form, the report stays on top. Very strange! It's not the end of the world if I don't sort it - it's just annoying me and I would love to be able to fix it. I can close the pop-up when the report opens and that works, it stays on top but the problem is that I have a reports menu which allows the user to print the report as well. If they print it from the reports menu, an error message comes up because it can't find the pop-up form. What I then have is two identical reports, one called from the pop-up form and one from the reports menu. This just seems daft to me and takes up space. I don't like untidy!
 

Users who are viewing this thread

Back
Top Bottom