473,387 Members | 1,899 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,387 software developers and data experts.

A minor point re Access 2007 and ZoomControl

ZoomControl is a hidden property of reports. Setting it to zero, makes
the report fit the window.

The default view of a report created in Access 2007 seems to be Report
View rather than the default in previous Access versions which was, I
think, Print Preview. This may have something to do with Report Viiew
not existing previously.

Reports opened in Report View do not have the property "ZoomControl",
or the property cannot be referenced.
So code such as
Report_SchoolOrganizationandStaff.Visible = True
DoCmd.Maximize
Report_SchoolOrganizationandStaff.ZoomControl = 0
fails with error message 2455
"You entered an expression that has an invalid reference to the
Property ZoomControl"

If we set the default view of the report to Print Preview the code
runs without error.

Yes I know that it's likely that very few use this method of
optimizing how a report appears on the screen.

And yes, I know that some will think I am asking a question and make
some irrelevant suggestion.

I've not spent much time in seeing if I can set the View dynamically.
While CurrentView is designated as read-write in the help file, code
trying to set it returns a read-only error.

Aug 27 '08 #1
6 3320
Lyle, I'm sure you realize that if you use an undocumeneted property like
ZoomControl, there's a risk it will break.

It's probably a simple thing to modify any existing code.
Perhaps something like this:

With Reports(0)
If .CurrentView = acCurViewPreview Then
.ZoomControl = 0
End If
End With

--
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.

"lyle fairfield" <ly************@gmail.comwrote in message
news:24**********************************@d45g2000 hsc.googlegroups.com...
ZoomControl is a hidden property of reports. Setting it to zero, makes
the report fit the window.

The default view of a report created in Access 2007 seems to be Report
View rather than the default in previous Access versions which was, I
think, Print Preview. This may have something to do with Report Viiew
not existing previously.

Reports opened in Report View do not have the property "ZoomControl",
or the property cannot be referenced.
So code such as
Report_SchoolOrganizationandStaff.Visible = True
DoCmd.Maximize
Report_SchoolOrganizationandStaff.ZoomControl = 0
fails with error message 2455
"You entered an expression that has an invalid reference to the
Property ZoomControl"

If we set the default view of the report to Print Preview the code
runs without error.

Yes I know that it's likely that very few use this method of
optimizing how a report appears on the screen.

And yes, I know that some will think I am asking a question and make
some irrelevant suggestion.

I've not spent much time in seeing if I can set the View dynamically.
While CurrentView is designated as read-write in the help file, code
trying to set it returns a read-only error.
Aug 27 '08 #2
Yep! In that way undocumented properties are just like documented
properties; they may break.

On Aug 27, 10:08*am, "Allen Browne" <AllenBro...@SeeSig.Invalid>
wrote:
Lyle, I'm sure you realize that if you use an undocumeneted property like
ZoomControl, there's a risk it will break.
Aug 27 '08 #3
"lyle fairfield" <ly************@gmail.comwrote
Yep! In that way undocumented properties are just
like documented properties; they may break.
But because the particular property is prone to breakage may well be the
reason _why_ it is undocumented. Based on "a few years in a corporate
environment (not Microsoft)", I might speculate that if testing shows up
problems in a feature/function, it may be much simpler to just leave it in
the product and not publicize it than to extract it from the product and
retest to assure that extracting it didn't cause worse problems -- and,
perhaps, someone has hopes that a little testing and a small hotfix will
allow it to be documented/publicized in the future.

Larry


Aug 27 '08 #4
I can't think of an undocumented feature that has broken. I have
used .Collect innumerable times over many years. I have used the
Wizhook functions less extensivley but they have never hiccoughed.
And Goto ...
And ....

ZoomControl did not break. It was a property of a report opened in
Print Preview. It still is.

But it was not extended to Report View. I'm not familiar enough with
Report View to venture an opinion as to whether or not the existence
of the ZoomControl property makes no sense in ReportView, whether it
might have been left out indavertantly or whether it might have been
left out as an initial step in terminating the property altogether.

I intended to alert anyone else who might have experienced the error
that puzzled me for a few minutes as to its cause.

As to its solution, Alan's code is not sufficient for me. For using it
will not ZoomControl to zero if the default view of the report is
Report View. It will just pass over setting this property.

As I do want to set the ZoomControl to zero, I will set my default
view too Print Preview.

Documented Properties have broken.
http://groups.google.com/group/comp....240252032dc60#
may show that a documented procedure, reading a value from a control,
worked until 2003, but not in 2007. This may not have been a huge
break, but it is at least a tiny crack.

On Aug 27, 1:27*pm, "Larry Linson" <boun...@localhost.notwrote:
"lyle fairfield" <lyle.fairfi...@gmail.comwrote

*Yep! In that way undocumented properties are just
*like documented properties; they may break.

But because the particular property is prone to breakage may well be the
reason _why_ it is undocumented. Based on "a few years in a corporate
environment (not Microsoft)", I might speculate that if testing shows up
problems in a feature/function, it may be much simpler to just leave it in
the product and not publicize it than to extract it from the product and
retest to assure that extracting it didn't cause worse problems -- and,
perhaps, someone has hopes that a little testing and a small hotfix will
allow it to be documented/publicized in the future.

*Larry
Aug 27 '08 #5
There are other reasons besides "not completely tested" for functions being
undocumented.

One might be "Oh, my, just think what fun Lyle could have with this
function. He might get carried away and do something rash. We'd better not
document it."

Seriously, there are functions left undocumented so they won't have to be
supported and so there's no implication that they will be in some future
version.

[Some | a few | many] are things that the Access team uses in development
and testing, so they are left in, but leaving them in for the Access team
does not obligate Microsoft, as noted above. Then, sooner or later, someone
finds them, the word gets out, and Microsoft (although they could do so)
won't take them away because doing so could cause a storm of resentment.

Larry
"lyle fairfield" <ly************@gmail.comwrote in message
news:1c**********************************@k30g2000 hse.googlegroups.com...
I can't think of an undocumented feature that has broken. I have
used .Collect innumerable times over many years. I have used the
Wizhook functions less extensivley but they have never hiccoughed.
And Goto ...
And ....

ZoomControl did not break. It was a property of a report opened in
Print Preview. It still is.

But it was not extended to Report View. I'm not familiar enough with
Report View to venture an opinion as to whether or not the existence
of the ZoomControl property makes no sense in ReportView, whether it
might have been left out indavertantly or whether it might have been
left out as an initial step in terminating the property altogether.

I intended to alert anyone else who might have experienced the error
that puzzled me for a few minutes as to its cause.

As to its solution, Alan's code is not sufficient for me. For using it
will not ZoomControl to zero if the default view of the report is
Report View. It will just pass over setting this property.

As I do want to set the ZoomControl to zero, I will set my default
view too Print Preview.

Documented Properties have broken.
http://groups.google.com/group/comp....240252032dc60#
may show that a documented procedure, reading a value from a control,
worked until 2003, but not in 2007. This may not have been a huge
break, but it is at least a tiny crack.

On Aug 27, 1:27 pm, "Larry Linson" <boun...@localhost.notwrote:
"lyle fairfield" <lyle.fairfi...@gmail.comwrote
Yep! In that way undocumented properties are just
like documented properties; they may break.

But because the particular property is prone to breakage may well be the
reason _why_ it is undocumented. Based on "a few years in a corporate
environment (not Microsoft)", I might speculate that if testing shows up
problems in a feature/function, it may be much simpler to just leave it in
the product and not publicize it than to extract it from the product and
retest to assure that extracting it didn't cause worse problems -- and,
perhaps, someone has hopes that a little testing and a small hotfix will
allow it to be documented/publicized in the future.

Larry

Aug 30 '08 #6
Sky
"lyle fairfield" <ly************@gmail.comwrote in message
news:24**********************************@d45g2000 hsc.googlegroups.com...
ZoomControl is a hidden property of reports. Setting it to zero, makes
the report fit the window.

The default view of a report created in Access 2007 seems to be Report
View rather than the default in previous Access versions which was, I
think, Print Preview. This may have something to do with Report Viiew
not existing previously.

Reports opened in Report View do not have the property "ZoomControl",
or the property cannot be referenced.
Thanks for documenting this change in behavior, so everyone else can fix
their code before it happens.

- Steve
Sep 4 '08 #7

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

Similar topics

37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
1
prn
by: prn | last post by:
Hi folks, I'm relatively new to Access, but I seem to have drawn the short straw, so I have the assignment for my workplace of looking for problems/inconsistencies in migrating applications to...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
5
by: ISUTri | last post by:
We are currently converting from Access 2003 to Access 2007. I have an Access app that is going to be very difficult to convert. This App is used by people that are out in the field and are a...
2
by: Birky | last post by:
Can someone point me in the right direction on how to use Version Numbers within Access? I have a database were its primary goal is to track the versions of several projects. Since the version...
1
by: ARC | last post by:
I think I made a major blunder, and now Access 2007 no longer opens. I made the mistake yesterday of using the "test" option in wise installer for my Access 2007 runtime app. It actually installed...
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: 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
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...
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:
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...
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,...

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.