Bringing report preview to top.
Author |
Message |
Douglas J. Taylor Jr #1 / 6
|
 Bringing report preview to top.
You can hide the Main Form within the event that opens the report, then make it visible within the Close event of the report. -- Doug Reply to is anti-spammed remove the "z" from email
Quote: >Here is my situation: >I have an app which is based in a single window. Some functions, >including report filtering, are done in pop-up windows. When a report >preview is opened from the main form or a menu, it comes up on top, >where we like it. When a report is opened from a pop-up, the onClick >code behind the preview button brings up the report then closes the pop- >up, thereby pulling the main window to the front, hiding the report. >There isn't much I can do with the pop-up, as it won't execute any code >after the close command is called. I have been trying to make the >report act in a modal fashion, but I haven't had much luck. I thought >about simu;lating a report preview in a form, but I only have one >lifetime to give to this project <g>. >Any thoughts on this?
|
Mon, 19 Nov 2001 03:00:00 GMT |
|
 |
read.. #2 / 6
|
 Bringing report preview to top.
Here is my situation: I have an app which is based in a single window. Some functions, including report filtering, are done in pop-up windows. When a report preview is opened from the main form or a menu, it comes up on top, where we like it. When a report is opened from a pop-up, the onClick code behind the preview button brings up the report then closes the pop- up, thereby pulling the main window to the front, hiding the report. There isn't much I can do with the pop-up, as it won't execute any code after the close command is called. I have been trying to make the report act in a modal fashion, but I haven't had much luck. I thought about simu;lating a report preview in a form, but I only have one lifetime to give to this project <g>. Any thoughts on this?
TIA Cary Gordon Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
|
Tue, 20 Nov 2001 03:00:00 GMT |
|
 |
read.. #3 / 6
|
 Bringing report preview to top.
Here is my situation: I have an app which is based in a single window. Some functions, including report filtering, are done in pop-up windows. When a report preview is opened from the main form or a menu, it comes up on top, where we like it. When a report is opened from a pop-up, the onClick code behind the preview button brings up the report then closes the pop- up, thereby pulling the main window to the front, hiding the report. There isn't much I can do with the pop-up, as it won't execute any code after the close command is called. I have been trying to make the report act in a modal fashion, but I haven't had much luck. I thought about simu;lating a report preview in a form, but I only have one lifetime to give to this project <g>. Any thoughts on this?
TIA Cary Gordon Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
|
Tue, 20 Nov 2001 03:00:00 GMT |
|
 |
Oliver Goehr #4 / 6
|
 Bringing report preview to top.
Cary, You will have to remember the name of your report, close the window and make the report window the top window. Here ist the code we use, which is executed from a subform in the print pop-up form EndFunction: DoCmd.Close acForm, Me.Parent.Name ' bring report to front ' showreport holds the name of the report ' Druckmodus is the German translation for Printmode and tells ' if the user wants to print or preview the report If Druckmodus = acViewPreview And Not Showreport = "" Then DoCmd.SelectObject acReport, Showreport End If Exit Function
Quote: > Here is my situation: > I have an app which is based in a single window. Some functions, > including report filtering, are done in pop-up windows. When a report > preview is opened from the main form or a menu, it comes up on top, > where we like it. When a report is opened from a pop-up, the onClick > code behind the preview button brings up the report then closes the pop- > up, thereby pulling the main window to the front, hiding the report. > There isn't much I can do with the pop-up, as it won't execute any code > after the close command is called. I have been trying to make the > report act in a modal fashion, but I haven't had much luck. I thought > about simu;lating a report preview in a form, but I only have one > lifetime to give to this project <g>. > Any thoughts on this?
> TIA > Cary Gordon > Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't.
|
Tue, 20 Nov 2001 03:00:00 GMT |
|
 |
Pieter Wijne #5 / 6
|
 Bringing report preview to top.
Better is to Hide the Popup Form before it opens The Report i.e Sub btnPrintIt() On Error Resume Next ' Or implement err Handling '... Me.Visible = False DoCmd.OpenReport Me!ReportName,AcViewPreview, WhereCondition := ... If Err.Number <> 0 Then Me.Visible = True '... Handle Error Else DoCmd.Close acForm , Me.Name End If End Sub -- Regards Pieter Wijnen
http://www.thuleeng.com Tough guys don't take backup - tough guys cry a lot.. Good site to look for Access answers is: http://home.att.net/~dashish
|
Tue, 20 Nov 2001 03:00:00 GMT |
|
 |
carygor.. #6 / 6
|
 Bringing report preview to top.
Thanks to everyone who responded! After a lot of experimentation, I found that the method with the fewest undesirable side effects (like resizing the Access app window or interfering with other code) was to attach "forms!TheMainForm.Visible = False" to the "Report_Activate" event and "forms!TheMainForm.Visible = True" to the "Report_Close" event of each report.
Quote:
> Here is my situation: > I have an app which is based in a single window. Some functions, > including report filtering, are done in pop-up windows. When a report > preview is opened from the main form or a menu, it comes up on top, > where we like it. When a report is opened from a pop-up, the onClick > code behind the preview button brings up the report then closes the pop- > up, thereby pulling the main window to the front, hiding the report. > There isn't much I can do with the pop-up, as it won't execute any code > after the close command is called. I have been trying to make the > report act in a modal fashion, but I haven't had much luck. I thought > about simu;lating a report preview in a form, but I only have one > lifetime to give to this project <g>. > Any thoughts on this?
> TIA > Cary Gordon > Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't.
Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
|
Wed, 21 Nov 2001 03:00:00 GMT |
|
|
|