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

Open Reports & Fit

P: n/a
Hi all

What's the best way to open a report, maximise it and show it's zoom mode as
'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.
Nov 13 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Paul Wagstaff wrote:
Hi all

What's the best way to open a report, maximise it and show it's zoom mode as
'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.

In your OnOpen event of the report you would enter
Docmd.Maximize

I'm not sure. I'll assume it is from RunCOmmand
Docmd.Runcommand acCmdFitToWindow
and there are other Runcommand constants to check out...
acCmdZoom10 to acCmdZoom1200 and acCmdZoomBox. Maybe one of them will work.

Nov 13 '05 #2

P: n/a
On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
Hi all

What's the best way to open a report, maximise it and show it's zoom mode as
'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.


From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
Thanks Fred - tried this, but it don't work. I can't find any documentation
either to have a the Zoom to 'Fit' as oppsed to 10% etc

Any thoughts?

Paul.
"fredg" <fg******@example.invalid> wrote in message
news:3o****************************@40tude.net...
On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
Hi all

What's the best way to open a report, maximise it and show it's zoom mode as 'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.


From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 13 '05 #4

P: n/a
On Sat, 5 Jun 2004 16:41:57 +0100, Paul Wagstaff wrote:
Thanks Fred - tried this, but it don't work. I can't find any documentation
either to have a the Zoom to 'Fit' as oppsed to 10% etc

Any thoughts?

Paul.
"fredg" <fg******@example.invalid> wrote in message
news:3o****************************@40tude.net...
On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
Hi all

What's the best way to open a report, maximise it and show it's zoom mode as 'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.


From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.


Paul,
I just re-read your original post and notice I missed the (Acc 97)
part.
Sorry, RunCommand is not available in Access 97.
You can try using similar code substituting the DoMenuItem method for
RunCommand.
You'll need to figure out the correct Report menu and item numbers for
FitToWindow. I don't have Access 97 available and can't do that for
you.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #5

P: n/a
fredg wrote:
On Sat, 5 Jun 2004 16:41:57 +0100, Paul Wagstaff wrote:

Thanks Fred - tried this, but it don't work. I can't find any documentation
either to have a the Zoom to 'Fit' as oppsed to 10% etc

Any thoughts?

Paul.
"fredg" <fg******@example.invalid> wrote in message
news:3o****************************@40tude.net.. .
On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
Hi all

What's the best way to open a report, maximise it and show it's zoom
mode as
'Fit'? - I wanna do this for all reports in my db (Acc 97).

TIA

Paul.

From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Paul,
I just re-read your original post and notice I missed the (Acc 97)
part.
Sorry, RunCommand is not available in Access 97.


Really? What have I been using these past few years. I don't think I
have a special version of A97.
You can try using similar code substituting the DoMenuItem method for
RunCommand.
You'll need to figure out the correct Report menu and item numbers for
FitToWindow. I don't have Access 97 available and can't do that for
you.


acCmdZoom10 to acCmdZoom200. If you get right down to it, Paul needs to
learn how to click on Help from the menu or highlight a the word
RunCommand and press F1.

Somewhere in cyberspace someone has a document that describes the the
constants and their purpose when used with RunCommand. With a little
bit of searching in google groups the document can be found.

Nov 13 '05 #6

P: n/a
On Sun, 06 Jun 2004 03:41:56 GMT, Salad wrote:
fredg wrote:
On Sat, 5 Jun 2004 16:41:57 +0100, Paul Wagstaff wrote:
Thanks Fred - tried this, but it don't work. I can't find any documentation
either to have a the Zoom to 'Fit' as oppsed to 10% etc

Any thoughts?

Paul.
"fredg" <fg******@example.invalid> wrote in message
news:3o****************************@40tude.net. ..

On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
>Hi all
>
>What's the best way to open a report, maximise it and show it's zoom

mode as

>'Fit'? - I wanna do this for all reports in my db (Acc 97).
>
>TIA
>
>Paul.

From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.


Paul,
I just re-read your original post and notice I missed the (Acc 97)
part.
Sorry, RunCommand is not available in Access 97.


Really? What have I been using these past few years. I don't think I
have a special version of A97.
You can try using similar code substituting the DoMenuItem method for
RunCommand.
You'll need to figure out the correct Report menu and item numbers for
FitToWindow. I don't have Access 97 available and can't do that for
you.


acCmdZoom10 to acCmdZoom200. If you get right down to it, Paul needs to
learn how to click on Help from the menu or highlight a the word
RunCommand and press F1.

Somewhere in cyberspace someone has a document that describes the the
constants and their purpose when used with RunCommand. With a little
bit of searching in google groups the document can be found.


Salad,
You are correct, it is available in Access 97. I thought I had started
out programming with Access 97 and it was not available until I
upgraded. Now I remember I started in Access 95 and upgraded to 97.
Thanks for the heads up.

Of course that means that my original reply to Paul is correct and the
code should work.

Here is the most complete list of RunCommand's, and how to use them,
that I know of.

http://home.clara.net/tkwickenden/

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #7

P: n/a
Salad wrote:
fredg wrote:
On Sat, 5 Jun 2004 16:41:57 +0100, Paul Wagstaff wrote:

Thanks Fred - tried this, but it don't work. I can't find any
documentation
either to have a the Zoom to 'Fit' as oppsed to 10% etc

Any thoughts?

Paul.
"fredg" <fg******@example.invalid> wrote in message
news:3o****************************@40tude.net...

On Fri, 4 Jun 2004 19:27:17 +0100, Paul Wagstaff wrote:
> Hi all
>
> What's the best way to open a report, maximise it and show it's zoom
mode as

> 'Fit'? - I wanna do this for all reports in my db (Acc 97).
>
> TIA
>
> Paul.
From a command button click event on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Paul,
I just re-read your original post and notice I missed the (Acc 97)
part.
Sorry, RunCommand is not available in Access 97.

Really? What have I been using these past few years. I don't think I
have a special version of A97.

The saying "sarcasm is the lowest form of wit" springs to mind here.
For reasons that I don't understand, Salad here is a sarcy bastard.
You can try using similar code substituting the DoMenuItem method for
RunCommand.
You'll need to figure out the correct Report menu and item numbers for
FitToWindow. I don't have Access 97 available and can't do that for
you.

acCmdZoom10 to acCmdZoom200. If you get right down to it, Paul needs to
learn how to click on Help from the menu or highlight a the word
RunCommand and press F1.

I suppose that asking for help is a bad thing for you Salad?
Searching through the F1-help mangle is not always the easiest of
things, and since newsgroups are USUALLY full of helpful people, where
else to ask for help from?
Just because you are a super-genius and have always known exactly where
to look doesn't mean that that is true for everyone.

Somewhere in cyberspace someone has a document that describes the the
constants and their purpose when used with RunCommand. With a little
bit of searching in google groups the document can be found.

Nov 13 '05 #8

P: n/a
smitty mittlebaum wrote:
Salad wrote:
acCmdZoom10 to acCmdZoom200. If you get right down to it, Paul needs
to learn how to click on Help from the menu or highlight a the word
RunCommand and press F1.
I suppose that asking for help is a bad thing for you Salad?


Not at all. I do so many times. Best Access folks in the whole wide
world reside here.
Searching through the F1-help mangle is not always the easiest of
things,
If you are talking about A97, stuff and nonsense. I agree with you on
the abomination called help in a2k and above.
Just because you are a super-genius and have always known exactly where
to look doesn't mean that that is true for everyone.


Not a super genius. But I will attempt to find answers to my problems
in Help or else on google groups first, especially if I have been
directed to something. If I am unfamiliar with a command or the
significance of the arguments, I'll type it out in a module, highlight
it, and press F1. Same thing in a property sheet, highlight the row and
press F1.
Nov 13 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.