dbTalk Databases Forums  

Report maximize on open

comp.databases.ms-access comp.databases.ms-access


Discuss Report maximize on open in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin
 
Posts: n/a

Default Report maximize on open - 11-20-2007 , 03:33 PM






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?



Reply With Quote
  #2  
Old   
Larry Linson
 
Posts: n/a

Default Re: Report maximize on open - 11-20-2007 , 11:19 PM






"Kevin" <none (AT) email (DOT) com> wrote

Quote:
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




Reply With Quote
  #3  
Old   
Kevin
 
Posts: n/a

Default Re: Report maximize on open - 11-21-2007 , 08:52 AM



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" <bouncer (AT) localhost (DOT) not> wrote

Quote:
"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




Reply With Quote
  #4  
Old   
Deano
 
Posts: n/a

Default Re: Report maximize on open - 11-22-2007 , 02:44 PM




"Kevin" <none (AT) email (DOT) com> wrote

Quote:
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




Reply With Quote
  #5  
Old   
Kevin
 
Posts: n/a

Default Re: Report maximize on open - 11-23-2007 , 07:19 PM



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" <deano (AT) mailinator (DOT) com> wrote

Quote:
"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





Reply With Quote
  #6  
Old   
Deano
 
Posts: n/a

Default Re: Report maximize on open - 11-24-2007 , 04:53 AM



"Kevin" <none (AT) email (DOT) com> wrote

Quote:
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?




Reply With Quote
  #7  
Old   
Kevin
 
Posts: n/a

Default Re: Report maximize on open - 11-24-2007 , 09:30 AM



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" <deano (AT) mailinator (DOT) com> wrote

Quote:
"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?





Reply With Quote
  #8  
Old   
Deano
 
Posts: n/a

Default Re: Report maximize on open - 11-24-2007 , 09:41 AM




"Kevin" <none (AT) email (DOT) com> wrote

Quote:
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.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.