Report maximize on open
am 20.11.2007 22:33:46 von Ondernemer
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?
Re: Report maximize on open
am 21.11.2007 06:19:37 von Larry Linson
"Kevin" 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
Re: Report maximize on open
am 21.11.2007 15:52:16 von Ondernemer
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.
"Larry Linson" wrote in message
news:JdP0j.2135$Pt.1288@trnddc02...
> "Kevin" 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
>
Re: Report maximize on open
am 22.11.2007 21:44:52 von Deano
"Kevin" wrote in message
news:zCX0j.38091$I52.69@fe07.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
Re: Report maximize on open
am 24.11.2007 02:19:37 von Ondernemer
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.
"Deano" wrote in message
news:5qm82bF110n67U1@mid.individual.net...
>
> "Kevin" wrote in message
> news:zCX0j.38091$I52.69@fe07.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
>
>
Re: Report maximize on open
am 24.11.2007 11:53:02 von Deano
"Kevin" wrote in message
news:I_K1j.62680$HY1.33181@fe05.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?
Re: Report maximize on open
am 24.11.2007 16:30:40 von Ondernemer
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.
"Deano" wrote in message
news:5qqe4jF1162dgU1@mid.individual.net...
> "Kevin" wrote in message
> news:I_K1j.62680$HY1.33181@fe05.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?
>
>
Re: Report maximize on open
am 24.11.2007 16:41:11 von Deano
"Kevin" wrote in message
news:zsX1j.98770$Eg2.15664@fe06.news.easynews.com...
> 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.
>
Good stuff. I didn't know about autocenter, but i will check it out and see
what it can be used for.