By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

Report view

P: n/a
Bob
I wish to have a Report open maximised AND with the size to fit the screen.
The "DoCmd" works to open maximised but how do I make it fit the screen in
VBA code??

Thanks, Bob.
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Bob wrote:
I wish to have a Report open maximised AND with the size to fit the
screen. The "DoCmd" works to open maximised but how do I make it fit
the screen in VBA code??

Thanks, Bob.


DoCmd.RunCommand acCmdFitToWindow

This has to be run in the code that opens the Report. It cannot (for some
silly reason) be run from the Report's own code module (like the Open event
which would be the logical place for it).

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
I posted this via Cogeco but Cogeco and Crap start with the same
letter. Apologies if Cogeco actually works and this is posted twice.

I believe ZoomControl is a hidden property of reports and forms.
The value assigned is the per cent of "zoom" wanted.
Zero maps to "size to fit".

example: (this is code from a working application)

With DoCmd
.OpenReport "rptActualOrganizationandStaffing", acViewPreview
.ShowToolbar "Print Preview", acToolbarNo
.Maximize
End With
Reports("rptActualOrganizationandStaffing").ZoomCo ntrol = 0

Developers have different opinions about hidden objects and methods. Of

course, MS makes no committment to maintain these. But MS makes no
committment to maintain anything (see my signature line). I have been
using
various hidden objects and methods from Access97 through Access2003.
None
has ever been removed or changed.
But, many developers will advise against their use.
You choose.

--
Lyle

Data Access Objects (DAO): DAO provides access to JET (Access)
databases.
This API can be used from Microsoft Visual Basic®, Microsoft Visual
C++®,
and scripting languages. It was included with Microsoft Office 2000 and

Office XP. DAO 3.6 is the final version of this technology. It will not
be
available on the 64-bit Windows operating system.

Nov 13 '05 #3

P: n/a
"Bob" <di**@attglobal.net> wrote in news:42********@news1.prserv.net:
I wish to have a Report open maximised AND with the size to fit the
screen. The "DoCmd" works to open maximised but how do I make it fit
the screen in VBA code??

Thanks, Bob.

I believe ZoomControl is a hidden property of reports and forms.
The value assigned is the per cent of "zoom" wanted.
Zero maps to "size to fit".

example: (this is code from a working application)

With DoCmd
.OpenReport "rptActualOrganizationandStaffing", acViewPreview
.ShowToolbar "Print Preview", acToolbarNo
.Maximize
End With
Reports("rptActualOrganizationandStaffing").ZoomCo ntrol = 0

Developers have different opinions about hidden objects and methods. Of
course, MS makes no committment to maintain these. But MS makes no
committment to maintain anything (see my signature line). I have been using
various hidden objects and methods from Access97 through Access2003. None
has ever been removed or changed.
But, many developers will advise against their use.
You choose.

--
Lyle

Data Access Objects (DAO): DAO provides access to JET (Access) databases.
This API can be used from Microsoft Visual Basic®, Microsoft Visual C++®,
and scripting languages. It was included with Microsoft Office 2000 and
Office XP. DAO 3.6 is the final version of this technology. It will not be
available on the 64-bit Windows operating system.
Nov 13 '05 #4

P: n/a
Bob
Rick & Lyle

Thanks for your help, Bob.
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.