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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help dynamically sizing a bound OLE frame on an Access report

Status
Not open for further replies.

gregsedwards

Instructor
Jan 10, 2002
11
US
Hi all,

I have been giving myself a crash course in Access OLE object support over the last few hours, but I still have a few questions.

Here's the situation. I am creating a database to store procedures and instructions. Each procedure record is related to many instruction records. I have created an OLE object field in the instruction record to store a picture (screen shot) representing the instruction. Obviously, not all instructions have screen shots.

When it comes time to print the procedure via a report, I would like to include the screen shot in a bound object frame in the detail section above the instruction's text fields. Different screen shots will be different sizes, so I need to figure a way to dynamically set the height of the control to match the height of the object. Additionally, I don't want to leave a big hole on the page if there's no image to print. I think I can handle resizing the detail section and moving the other controls up to cover a missing graphic, but how do you determine the size of the graphic in the frame?

This would be so much easier if they'd just give bound object frames a CanGrow and CanShrink property!

Thanks in advance for any comments or suggestions. Tek-tips rocks! :)

Greg Edwards
Technical Instructor
 
No tips yet? I can't believe this is really that difficult. Perhaps it's just not a question worthy of your time.
 
gregsedwards,

Have you figured this one out?

I'm trying to do the same thing with a pricelist here, some sections of the report have a subheading with a small icon, some don't, so i need to resize the subheader sections accordingly (otherwise there's a big ugly gap between the main header and the body).

I've tried using the .Move method, eg:

If IsNull(Me.olePICTURE) Then
Me.olePICTURE.Move pic_left, pic_top, pic_width, pic_height
...

But that gives a Run Time error 2101 - The setting you entered isn't valid for this property.

The trouble is i've tried with a range of diferent values for each of the dimentions and nothing changes.

Any help would be greatly appreciated.

Thanks
--e
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top