canshrink report header

J

JamesDeckert

Using Access 2003
I've tried programmatically setting the CanShrink property of some sections
and can't get them to work. I get the following error.

Run-time error 2455
You entered an expression that has an invalid reference to the property
CanShrink.

I've tried the following
Me.PageHeaderSection.CanShrink = True
Me.ItemCodeHeader.CanShrink = True
Me.Section("ItemCodeHeader").CanShrink = True

The reason for doing it programmatically is that the page header doesn't
have a canshrink property in design view, but it does with intellisense.
Since I haven't been able to set the page header, I thought I'd try some
other sections, and I still get an error.

thanks for any input,
James
 
J

Jeff Boyce

On which line do you get this message?

Have you tried remarking-out one of those lines at a time to see which
one(s) don't work?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Duane Hookom

I don't think you can do anything to shrink Page Header and Footer sections.
There may be an opportunity to set the can shrink property of other sections
in the On Open event of the report. Setting this property may only be allowed
while in Design View.

There may be alternative solutions if we knew why you wanted to attempt this.
 
J

JamesDeckert

My goal is to use only one report to create two reports. The difference is
one of the reports has more detail. So I want to remove the detail controls
(done) and their corresponding labels (done) from the page header. But I'd
then like to shrink the page header.

Instead of using canshrink, I moved the labels to Top 0, then changed the
size of the page header to 0. This accomplishes the task I was trying to
accomplish.

I did notice in the help system that it states that sections can only be set
to canshrink in the property sheet. I still don't understand why the page
header doesn't have CanShrink in the property sheet, but it is in the
intellisense.

thanks for the input.
James Deckert
 
D

Duane Hookom

I remember when we didn't have intellisense ;-)
There are properties and methods that don't show up that should be there and
others that show up but shouldn't. For instance, you don't see a Visible
property in the property sheet for page breaks. This property is legitmate
and can be set with code.

There are also properties that can be set only in design mode (not run-time).
 
J

Jeff Boyce

So what Duane is saying is that it shows some stuff it shouldn't and doesn't
show some it should.

Maybe it should be called "averagisense"...<g>

Jeff B.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top