Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Apr 2008
    Posts
    189

    Question Unanswered: Make an OLE Object in a Form resizable?

    Hello,
    Is there any way to make a OLE Object inside a Form resizable?

    The problem I have is this: I have some rows that has a picture in the table and some rows that have nothing.

    So, the OLE object takes the same space all the time in the Report.

    Is there any way to solve this?

    Am I clear?
    Thanks!
    Saludos,
    pepemosca

  2. #2
    Join Date
    Apr 2008
    Posts
    189
    Is this imposible?

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    First, decide whether it is a form or a report that you're talking about.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    If you could somehow "encapsulate" it into a text box where you can set the can grow/can shrink properties to true, it might help. But I think I somehow "underlayed" the ole object under another object which I could shrink/grow. I can't recall exactly how I did it though. Otherwise, try setting something up via using code which somehow sets the width/height in the onFormat event if that works.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I was going to mention Can Grow / Can Shrink, but these don't work on forms.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Oh...Forms - I kept thinking reports for some reason in my response.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Nah, you might yet be right mate. It is still unclear as to whether the OP is talking forms or reports.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  8. #8
    Join Date
    Apr 2008
    Posts
    189
    I need it in both Forms and Reports... But mainly in Reports.

    The thing is that I have a picture in an OLE field in my tables that I want to show... but when the picture is not present (the field is null) I don't want the OLE control to have height.

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why use OLE to store a picture that is coming from a table?
    ...use an image control instead........

    whilst we are at it why use a table to store a picture in the first place?
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Apr 2008
    Posts
    189
    Quote Originally Posted by healdem
    why use OLE to store a picture that is coming from a table?
    ...use an image control instead........

    whilst we are at it why use a table to store a picture in the first place?
    Yeah, I know, storing the image in the table is not the best solution... But I need it all packaked.

    Also I'll need the user to create the file and paste the filename in the table.
    The form I'm using is to add rows in my database.

    Regarding the OLE: I'll check it out. Thanks!

  11. #11
    Join Date
    Apr 2008
    Posts
    189

    Question

    But "Image" only let me set a path to the image and not the "field" name.

    Check the attachment.

    Also is not resizable like a text box.
    What I'm doing wrong?
    Attached Thumbnails Attached Thumbnails Dibujo.bmp  

  12. #12
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You set the image object to refer to the path which is stored in a field in your table with VBA in the On Current event for your form.

    Much better than storing the image in your tables.

    You can't do what you want to do using continuous forms. You can do it by using the Can Grow and Can Shrink options in reports.

    Thumbnails might be the answer for forms. Make a small image that doesn't take up too much room and then have the user click the image to see it in full size using a dialog box.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  13. #13
    Join Date
    Apr 2008
    Posts
    189
    Is it any easy way for the user of the database to:

    Paste an image
    That image being saved in the HDD
    and make the database to store tha path of that image in a table?

    I'm using that "OLE object" thing, because is the most easiest way to save a picture... the other way will requiere the user to save the picture in a JPEG and get the PATH and save it into the database.

    Any ideas?

  14. #14
    Join Date
    Apr 2008
    Posts
    189
    I have tried your idea, but I can't make it work.

    The thing is this, for every row of data: the Detaill area height grows and grows and never goes back to a "fit" size.

    I have tried to run a code like:

    Code:
    Private Sub Detalle_Format(Cancel As Integer, FormatCount As Integer)
    Randomize
    Me.Imagen0.Height = 5000 * Rnd
    Me.Height = Me.Imagen0.Height + 1000
    DoEvents
    End Sub
    But didn't work the Me.Height, says that cannot be changed. Read only attribute.

    Any ideas?
    Thanks!
    Attached Files Attached Files

  15. #15
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Have you looked at Can Grow and Can Shrink?

    And what is with setting the height to a random number?? ^^
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •