Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing a Subform

Status
Not open for further replies.

sagamw

Technical User
Nov 11, 2009
104
GR
I have this Form that has a Subform.
This Subform is about 75% the area and has only 1 object: a picture.

Let's say I change the picture with a bigger one (bigger than the subform's area). Obviously scroll bars appear.
By moving the scroll bars I can reach the both ends of my (bigger) image, and that's what I want.
If I change the image for another, a smaller one this time, all work as intended but if I move the scrollbars they surpassed the new (shorter) ends of my 3rd image and reach the end of the previous (bigger) image.

(I know how to hide the scroll bars by using the .scrollbars = 0. This not what I want.)

In one sentense: The scrollbars always extend to the limits of the bigger image and they never shrink back.

If I close and re-open the main form, the "limits" reset, but not as long as the form stays open.

How can I have the scrollbars to reach the end of the current image and not the "session's bigger"?

Some things I tried was: setting the .width .height properties of my subform either like this
[forms]![mainform]![subform].width and like this [forms]![mainform].form.[subform].width or [forms]![mainform]![subform].section(acDetail).height ,I have set the detail section's grow and shrink properties
to yes


But with no luck...







 
How are ya sagamw . . .

Have a look at the [blue]Picture Size Mode[/blue] property of the subform! ... particularly [blue]Zoom![/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hi TheAceMan1,
and thank you for your answer but I tried all 5 options of the property of the subform (also the similar options of the picture object) with no luck.

I tried setting the property in the properties sheet and through VBA by using .SizeMode = acOLESizeZoom, still the same behavior. :-(
 
I can't understand what is the property that changes...

It's not the subforms's width and height.
If I set them with [forms]![myform]![mysubform].width it changes the dimensions of the subform object inside my form. (that's not what I want obviously), BUT even then if the picture object in my subform grows to hold a bigger picture and then I load a smaller one, I still get the unused/blank/scrollable space that the bigger picture covered earlier.

*sigh*

I can't understand what property changes, to find a way to control it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top