Results 1 to 9 of 9
  1. #1
    Join Date
    May 2005
    Posts
    119

    Red face Unanswered: OLE bound frame - picture showing as icon

    I have a table containing employee pictures. My field is set up as an OLE object. When I insert the picture (from file - jpg), it shows only as as icon. If I double-click, it will open picture manager.

    How do I make my form display the picture instead of an icon?? I have the same problem with adding it to a report!

    Frustrated,
    Krista

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    I don't know about the direct answer to your question, but I use a slightly different method for a similar table.

    I store the file path for the picture for each employee in the table. Then on the form, do an Insert > Picture..., and insert any random picture. Double-click the picture to get the properties, and delete the Picture path property (this will give you an empty frame that you're after). Set the Picture Type to Linked. I also choose to set the Size Mode to Zoom, but that's your call.

    On the On Current event of your form, do like
    Me.PictureControl.Picture = nz(dlookup("[FldPicLocation]","TblEmployees", "[FldPrimKey] = " & me.FldPrimKey),"")
    or something of the sort.

    For your report, do something similar, but on the On Format event.

    HTH.
    Last edited by nckdryr; 04-04-07 at 12:36.
    Me.Geek = True

  3. #3
    Join Date
    May 2005
    Posts
    119
    Well, I didn't find any onformat() for the report...
    I tried using the OnPage and it crashed my application (oops!)

    I guess I should've tried the form first - Just like me to jump in feet first on the deep end!

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    For the report, look in the Details Section properties.

    You'll of course have to change the code slightly to match your field names, table names, etc..
    Me.Geek = True

  5. #5
    Join Date
    May 2005
    Posts
    119
    OK - it worked for the form.. I saved the path - like you said - and I actually had to use

    on current
    Me.Image8.picture = Nz(Me.picturepath, "")

    I haven't done the report, yet.

    Thanks for your help!

  6. #6
    Join Date
    May 2005
    Posts
    119
    OK - it's not working for the report. What am I doing wrong??? I get an invalid reference using the following statement.

    Me.Emp_picture.report.picture = Nz(Me.pictureturepath, "")

  7. #7
    Join Date
    May 2005
    Posts
    119
    I got it working - removed ".report"..
    Me.Emp_picture.picture = Nz(Me.pictureturepath, "")

    However, it keeps importing the .jpg - once for every employee in the report (a few hundred), which really slows down the report.

    This would be great for a 'one-pager'; but is not working for this report.
    Is there any other way to accomplish this task??

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Could you move the picture loading to the On Page event, rather than initialize it with all images?
    George
    Home | Blog

  9. #9
    Join Date
    May 2005
    Posts
    1,191
    I think if you have your pictures set to Embedded (as opposed to Linked), the report may load quicker. However, this may make your overall database load slower as it is significantly bigger. And you may also start having to worry about that pesky 2GB cap. With that much data, you're going to be a little slow either way you go I think. Just a thought...
    Me.Geek = True

Posting Permissions

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