473,466 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Viewing Reports

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
6 2761
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lewis via DotNetMonster.com | last post by:
I've created an program that uses crystal reports and have no problems on the machine that I created it on but when viewing the app on another machine I get teh error message "File or assembly name...
0
by: Karl Irvin | last post by:
In A2000 reports being viewed open in a readable size font. In A2003, the reports open in a "fit page to screen" mode and the text is too small to read and I have to click on the report every...
2
by: Atley | last post by:
I have imbedded a report in my project (added a report to my project and set some fields) How the heck do I access the report in my program? I have looked on MSDN and searched for a...
4
by: John R. Dougherty | last post by:
I have developed an application with VB.NET, which includes the Crystal Reports (Visual Studio .NET 2003 edition) controls. I can run the application on my PC and it does work fine, but on any...
2
by: simonbuxton132 | last post by:
When openening any ASP web page on my local IIS web server the site reports Server Application Error The server has encountered an error while loading an application during the processing of...
3
by: tom.youdan | last post by:
Hi, I have created a database that is used to store contact information for NGO's accross India. It is simple in structure and I want a portion of the data to be viewable on the Internet. I...
1
by: Sher Dil | last post by:
07.02.2007 / 2020 hours. I am basically working as an astrologer, and have developed my own software in VB6.0 + Access + Crystal Report 4.6.1.0 What ever I select (I enter code, which...
0
by: r0ckster | last post by:
Hi! I have an asp application that is using crystal report 10/crystal report viewer to view reports on the web. This app works well in windows 2k but when i migrated the code to xp, the error...
14
klarae99
by: klarae99 | last post by:
Hello, I am working on an Access 2003 Database for inventory control. I am setting up a form (frmProducts) for the viewing and adding of product information. I have several tables that this...
0
by: Frank | last post by:
Hi, We have a web application which is using SQL reports(2005). The Web application and Reports (server reports) exist in the same machine. When we try to view the report through report viewer...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.