473,378 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Report view

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
4 1776
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
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
"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
Bob
Rick & Lyle

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ranman | last post by:
Hi all, I have a simple problem that hopefully has a simple solution, but I have yet to figure it out. In a patient database, I have a physician test order form that populates a report that is...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
0
by: CSDunn | last post by:
Hello, I have a format issue on an Access 2000 ADP report that I am going to attempt to explain from a 'ten thousand foot view' : I have an Access 2000 ADP report that has a SQL Server 2000...
0
by: Erwin | last post by:
I'm working on a report. Within this report a chart (line chart) is build which shows how many suggestions have been made per servicegroupe. Now I have put such a chart into the report, but the...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
3
by: tommy | last post by:
I am working with the Invoice report in the Northwind sample database. How can I see the SQL statement that provides the data to the report? Thanks.
6
by: DeniseY | last post by:
I have an Access report that is created on the fly by the user selecting the fields to be included. The Access report comes out fine, but I want it to automatically output to an Excel spreadsheet....
1
by: sonicfun2006 | last post by:
I have SQL Server Database and MS Access 2003 is connected with ODBC. I have very large amount of records in various tables. The database is very dynamic as it changes every minute. I’m trying to...
1
by: Tudor | last post by:
Hi All. I'm new to this forum (as a registree) although I do come by here to find answers which I do always find. I thought I'd post a question and see if anyone can help! I'm developing a DB in...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.