![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the onOpen event of my report as docmd.maximize but when I open the report rather than truly maximizing the window, it enlarges it so that it fills the screen, i.e. the title bar and border are still visible. If I do not set the onopen event to do this, and I hit the maximize button on the window, it enlarges properly. Any ideas why it would do this? |
#3
| |||
| |||
|
|
"Kevin" <none (AT) email (DOT) com> wrote I have the onOpen event of my report as docmd.maximize but when I open the report rather than truly maximizing the window, it enlarges it so that it fills the screen, i.e. the title bar and border are still visible. If I do not set the onopen event to do this, and I hit the maximize button on the window, it enlarges properly. Any ideas why it would do this? Care to clarify "truly maximizing the window"? Care to clarify "open the report"? Would that be click the Preview button in the Report tab of the Database window? Double-click the Report's name in the Report tab of the Database window? Execute a DoCmd.OpenReport statement? Care to clarify "enlarges properly"? Just what do you expect to see, or not to see? Larry Linson Microsoft Access MVP |
#4
| |||
| |||
|
|
Sorry for the confusion. On a form there is a command button to open a report (docmd.openreport...) on the OnOpen event of the form i have docmd.maximize. This is supposed to enlarge the report the same as if you hit the middle button on the control/title bar ( _ |_| X ) but it does not do this. It enlarges the window so the title bar is visible and just below the menu bars. |
#5
| |||
| |||
|
|
"Kevin" <none (AT) email (DOT) com> wrote in message news:zCX0j.38091$I52.69 (AT) fe07 (DOT) news.easynews.com... Sorry for the confusion. On a form there is a command button to open a report (docmd.openreport...) on the OnOpen event of the form i have docmd.maximize. This is supposed to enlarge the report the same as if you hit the middle button on the control/title bar ( _ |_| X ) but it does not do this. It enlarges the window so the title bar is visible and just below the menu bars. I'm not entirely sure what you're going on about but let me hazard a guess. Let's assume your report is opened in Access. Click on View then Zoom. "Zoom 100%" is selected but what you want is "Fit to Window". Click the latter for me and if that is what you want to happen then after the code DoCmd.OpenReport stDocName, acViewPreview Insert this line; DoCmd.RunCommand acCmdFitToWindow |
#6
| |||
| |||
|
|
No, fitToWindow is concerning the zoom of the actual report. What I am concerned with is the size of the window itself. Try this... Open access and you have the database window on the screen with empty space around it. Move your cursor over each side of the window on the border. The cursor turns to a double arrow. Now drag each of the four sides to the edge of your monitor. This is what happens when the report opens with docmd.maximize in the onopen event. Now take that same window and click the "maximize" button in the upper right corner. That is what is supposed to happen. |
#7
| |||
| |||
|
|
"Kevin" <none (AT) email (DOT) com> wrote in message news:I_K1j.62680$HY1.33181 (AT) fe05 (DOT) news.easynews.com... No, fitToWindow is concerning the zoom of the actual report. What I am concerned with is the size of the window itself. Try this... Open access and you have the database window on the screen with empty space around it. Move your cursor over each side of the window on the border. The cursor turns to a double arrow. Now drag each of the four sides to the edge of your monitor. This is what happens when the report opens with docmd.maximize in the onopen event. Now take that same window and click the "maximize" button in the upper right corner. That is what is supposed to happen. In that case I'm not sure what to say, Docmd.maximize seems to work as intended for me. Is this s a glitch with your setup/version of Access? Does this behaviour continue with a new database? |
#8
| |||
| |||
|
|
Success! In the report format, Autocenter was set to yes which apparently prevented it from truely maximizing on its own. I changed it back to no and now it works great. Thanks for the help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |