Results 1 to 8 of 8
  1. #1
    Eric S
    Guest

    How do I connect OLE object field to Photos?

    I am trying to incorporate Employee photos from a digital camera into the Employee records. The photos are in .jpg format (although they can be in any necessary format). I have added a field with the OLE object field type. I have a form which displays the field as a big box to display the photo. My question is how do I LINK the photos to the database? What I have tried so far just shows the files icon. I want the photo of the employee to show up on the form. What is stored in the field for each employee so the database knows where to look for their photo?

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I connect OLE object field to Photos?

    http://support.microsoft.com/support/Acces...ind/default.asp is the site to go to for information about adding pictures to forms. Once you are at the site, click on Task view. Search under Tables and under Forms and you should get the help you need. I needed to do the same thing and this walked me through exactly how to do it. Let me know if this helps.

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Location
    Manhattan, Kansas, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I connect OLE object field to Photos?

    Embedding OLE objects in your table adds a lot of overhead to your mdb. If the table is very large, it will balloon up very quickly because of that OLE object. This can add significant load time to that table and any other object that uses that table. A better way to do what you want is to add a text field to your table which stores the path to the related jpg somwhere on your server, instead of storing the image directly in an OLE field. On your form, include a textbox bound to this field and set its Visible property to No. In the OnCurrent event for the form, you will need to write code that assigns the path from this field to the Picture property of the Image control on the form. This code is fairly easy to write, I can send you an example if you like. This method works quite nicely (fast and efficient). It means you will have a (somewhat) large repository of image files on your server, but your mdb will run much more smoothly.

  4. #4
    Eric S
    Guest

    Re: How do I connect OLE object field to Photos?

    Thanks! I finally got around to trying this and it seems to be a good method. I am naming the files the employee name IE: 1357.jpg. That way I don't have to alter my table at all! Instead of storing the path to each photo I just store the path to the photo folder in a "settings" table (I use this to hold pointers and such so I don't have to hard code them). Then on the OnCurrent event I just change the source to the picture field to the employee#.jpg file. Works great! Thanks for the idea.

  5. #5
    JamesP
    Guest

    Re: How do I connect OLE object field to Photos?

    I have read what you wrote in your entry

  6. #6
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I connect OLE object field to Photos?

    You described my problem perfectly. Would it be possible to see the code for this? Thank you for any assistance you can give me.

  7. #7
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I connect OLE object field to Photos?

    How would you do this so that the photos would appear in a report?

  8. #8
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I connect OLE object field to Photos?

    I believe that I have figured it out. Thank you for the hint. I would still like to see your code and if you would like I can send you my solution.

Posting Permissions

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