REPOST: Strange Behaviour With Maximize

R

Rob Parker

I originally posted this in the .reports newsgroup last Thursday; so far,
there's been not a single reply. I'm re-posting here in the hope that
perhaps a wider/different audience may have someone who can assist.

Rob

<original post>

I am experiencing the same (or very similar) problem as another user posted
a couple of weeks ago in a thread "Report is maximizing weird" - see
http://groups.google.com.au/group/m...1/a37cf67468fb6232?lnk=st&q=#a37cf67468fb6232

I have several reports in a database (running in Access 2002 under Win XP
Pro, with all service packs; database in Access 2000 file format). All
these reports have the following code:

Private Sub Report_Activate()
DoCmd.Maximize
End Sub

Private Sub Report_Deactivate()
DoCmd.Restore
End Sub

Some reports open maximized correctly, while others do not; they open in a
window, which is as wide as the application window and taller than the
application window. This window cannot be moved or resized. It has both
horizontal and vertical scrollbars, but the horizontal scrollbar (which
includes the page navigation buttons) is not a real scroll-bar - it moves
with the report text if the vertical scrollbar is used, and disappears when
clicked on (in either the navigation area or the scrollbar).

The problem appears to also be related to the window size of the Access
application. I normally run Access maximized, and when I do so the problem
appears consistently for some reports - but not, as I said earlier, for all
reports. However, if I reduce the size of the Access application window,
the maximize behaviour of a report which always exhibits the problem
behaviour in a maximized Access window changes; when the Access application
window becomes small enough to require a horizontal scrollbar to display the
database window, the reports will maximize correctly. By reducing the size
of the database window, I can get the problem reports to exhibit the strange
behaviour in an Access application window only a couple of hundred pixels
wide.

A little further playing shows that if I force a horizontal scrollbar to
appear for the Access application window - by moving the database window
partially off-screen - then all reports will maximize correctly.

Apart from the post a couple of weeks ago, has anybody else seen this
behaviour? More importantly, does anyone know what it's caused by and how
to resolve it? [Note: I don't consider "position the database window
partially off-screen" to be an acceptable solution to the problem ;-) ]

TIA,

Rob
 
D

DanRoss

What are the POPUP Property values set for on the reports - have you
compared them?

If i understand the maximize functionality, if you Maximize an object that
is NOT a popup - ACCESS it's self is maximized, and all the other objects
will be to, so having a Maximize in one form and a Restore in other in the
Activate, Deactivate events sounds like it might do some odd thing.

I only have 2007 installd so cant play much but think the POPUP property is
worth looking at.



Rob Parker said:
I originally posted this in the .reports newsgroup last Thursday; so far,
there's been not a single reply. I'm re-posting here in the hope that
perhaps a wider/different audience may have someone who can assist.

Rob

<original post>

I am experiencing the same (or very similar) problem as another user
posted
a couple of weeks ago in a thread "Report is maximizing weird" - see
http://groups.google.com.au/group/m...1/a37cf67468fb6232?lnk=st&q=#a37cf67468fb6232

I have several reports in a database (running in Access 2002 under Win XP
Pro, with all service packs; database in Access 2000 file format). All
these reports have the following code:

Private Sub Report_Activate()
DoCmd.Maximize
End Sub

Private Sub Report_Deactivate()
DoCmd.Restore
End Sub

Some reports open maximized correctly, while others do not; they open in a
window, which is as wide as the application window and taller than the
application window. This window cannot be moved or resized. It has both
horizontal and vertical scrollbars, but the horizontal scrollbar (which
includes the page navigation buttons) is not a real scroll-bar - it moves
with the report text if the vertical scrollbar is used, and disappears
when
clicked on (in either the navigation area or the scrollbar).

The problem appears to also be related to the window size of the Access
application. I normally run Access maximized, and when I do so the
problem
appears consistently for some reports - but not, as I said earlier, for
all
reports. However, if I reduce the size of the Access application window,
the maximize behaviour of a report which always exhibits the problem
behaviour in a maximized Access window changes; when the Access
application
window becomes small enough to require a horizontal scrollbar to display
the
database window, the reports will maximize correctly. By reducing the
size
of the database window, I can get the problem reports to exhibit the
strange
behaviour in an Access application window only a couple of hundred pixels
wide.

A little further playing shows that if I force a horizontal scrollbar to
appear for the Access application window - by moving the database window
partially off-screen - then all reports will maximize correctly.

Apart from the post a couple of weeks ago, has anybody else seen this
behaviour? More importantly, does anyone know what it's caused by and how
to resolve it? [Note: I don't consider "position the database window
partially off-screen" to be an acceptable solution to the problem ;-) ]

TIA,

Rob
 
R

Rob Parker

All the reports have Popup set to No. I don't recall ever seeing a report
with that property set to Yes; I've certainly never changed it from the
default No.

It's not true that if you maximize a report with Popup = No that Access
itself will maximize. I've just done some testing, and I find that if I
maximize a report with Popup set to Yes, the report's window maximizes on
screen, obscuring the Access application's title bar, menu bar and
toolbar(s); and in that case, the maximize code in the activate event does
not appear to have any effect. Also, with the popup property set to Yes,
the report window can extend beyond the Access application's window. Seems
very strange to me, and I don't think I'll ever set a report's popup
property to Yes.

I regularly use the Maximize/Restore commands in all my report's
Activate/Deactivate events, and I've never had a problem with it before.
The database in question is one that came with John Viescas's book "Building
MS Access Applications"; I added that code to all the reports because I
don't like windowed reports in preview mode, and did some slight tweaking to
fit things to an A4 page, rather than a Letter page.

Thanks for the response; sadly, it wasn't helpful.

Rob

DanRoss said:
What are the POPUP Property values set for on the reports - have you
compared them?

If i understand the maximize functionality, if you Maximize an object that
is NOT a popup - ACCESS it's self is maximized, and all the other objects
will be to, so having a Maximize in one form and a Restore in other in the
Activate, Deactivate events sounds like it might do some odd thing.

I only have 2007 installd so cant play much but think the POPUP property
is worth looking at.



message
I originally posted this in the .reports newsgroup last Thursday; so far,
there's been not a single reply. I'm re-posting here in the hope that
perhaps a wider/different audience may have someone who can assist.

Rob

<original post>

I am experiencing the same (or very similar) problem as another user
posted
a couple of weeks ago in a thread "Report is maximizing weird" - see
http://groups.google.com.au/group/m...1/a37cf67468fb6232?lnk=st&q=#a37cf67468fb6232

I have several reports in a database (running in Access 2002 under Win XP
Pro, with all service packs; database in Access 2000 file format). All
these reports have the following code:

Private Sub Report_Activate()
DoCmd.Maximize
End Sub

Private Sub Report_Deactivate()
DoCmd.Restore
End Sub

Some reports open maximized correctly, while others do not; they open in
a
window, which is as wide as the application window and taller than the
application window. This window cannot be moved or resized. It has both
horizontal and vertical scrollbars, but the horizontal scrollbar (which
includes the page navigation buttons) is not a real scroll-bar - it moves
with the report text if the vertical scrollbar is used, and disappears
when
clicked on (in either the navigation area or the scrollbar).

The problem appears to also be related to the window size of the Access
application. I normally run Access maximized, and when I do so the
problem
appears consistently for some reports - but not, as I said earlier, for
all
reports. However, if I reduce the size of the Access application window,
the maximize behaviour of a report which always exhibits the problem
behaviour in a maximized Access window changes; when the Access
application
window becomes small enough to require a horizontal scrollbar to display
the
database window, the reports will maximize correctly. By reducing the
size
of the database window, I can get the problem reports to exhibit the
strange
behaviour in an Access application window only a couple of hundred pixels
wide.

A little further playing shows that if I force a horizontal scrollbar to
appear for the Access application window - by moving the database window
partially off-screen - then all reports will maximize correctly.

Apart from the post a couple of weeks ago, has anybody else seen this
behaviour? More importantly, does anyone know what it's caused by and
how
to resolve it? [Note: I don't consider "position the database window
partially off-screen" to be an acceptable solution to the problem ;-) ]

TIA,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top