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

Viewing Reports

P: n/a
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
In the Activate event of the report:
RunCommand acCmdZoom150

Activate fires for preview, but not for print.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike

Nov 12 '05 #2

P: n/a
Hi Mike,

Try this:

Private Sub cmdOpenReport_Click()

Dim strReport As String

strReport = "Report1"
DoCmd.OpenReport strReport, acPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom150

End Sub
"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike

Nov 12 '05 #3

P: n/a
Thanks, again, Allen. What would we do without you? So many time you have
solved my problems over the years.

Mike

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:40**********************@freenews.iinet.net.a u...
In the Activate event of the report:
RunCommand acCmdZoom150

Activate fires for preview, but not for print.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike


Nov 12 '05 #4

P: n/a
I have just tried this and got the following message....

Run-time error '2046'

The command or action 'Zoom150% isn't available now

I am running Office 2003 would this make a difference? Do I need any
particular library to be referenced?

Thanks

Mike
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:40**********************@freenews.iinet.net.a u...
In the Activate event of the report:
RunCommand acCmdZoom150

Activate fires for preview, but not for print.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike


Nov 12 '05 #5

P: n/a
Yep: looks like Activate it too early to execute the zoom.

Try issuing the command immedately after the OpenReport action, i.e.:
DoCmd.OpenReport ("rptA5SendOut"), acViewPreview
RunCommand acCmdZoom150

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
I have just tried this and got the following message....

Run-time error '2046'

The command or action 'Zoom150% isn't available now

I am running Office 2003 would this make a difference? Do I need any
particular library to be referenced?

Thanks

Mike
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:40**********************@freenews.iinet.net.a u...
In the Activate event of the report:
RunCommand acCmdZoom150

Activate fires for preview, but not for print.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike" <re******@hotmail.com> wrote in message
news:40********@dnews.tpgi.com.au...
Is there a way for force access to view reports in a magnified view on
opening of the report from VBA?

I am using the following code to open the report

DoCmd.OpenReport ("rptA5SendOut"), acViewPreview

And I would like the report to be viewed at 150% when opened.

Mike



Nov 12 '05 #6

P: n/a
Tym
On Thu, 29 Jan 2004 23:33:16 +1100, "Mike" <re******@hotmail.com>
wrote:
Run-time error '2046'

The command or action 'Zoom150% isn't available now


It could just be you've put Zoom150% instead of Zoom150...
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.