Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    OLE? (Access 2000>)

    The scenario:
    I carry a zipped DB with me for sample purposes. The DB has a copy of the Northwind sample table in it. (I imported it when I created my own sample DB). The table has a field called Employee Photo with a data type of OLE Object.
    When I unzip the DB and open the employee form, the photo's display as usual.
    My Question:
    The photo's are obviously embedded in the database, else they would complain that the source path is not found. When I choose OLE as a data type what is the default. Are photo's stored IN the DB, how can I get them linked (if I do not transport the DB around and to make the DB smaller as the photo's are not stored IN the DB???)
    Any advice and guidance appreciated!
    Tx
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OLE? (Access 2000>)

    The recommended approach is to store the path and filename of the image in a text field in the database, and to use a standard image control (not an unbound OLE control) and some VBA code to display the image. The database attached to <post#=296892>post 296892</post#> demonstrates how to do this in a form and in a report. The images can be .bmp, .jpg, .gif, .png, .wmf, .tif and several other graphics formats.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: OLE? (Access 2000>)

    Hi Hans,

    Tx for the reply. I think the 2002 version of Northwind DB also does this with the employees photo field. This may be the recommended approach, but it still does not explain how my old version (which has the OLE obj datatype) still shows the photo in my zipped DB. I assume that the photo is theirfore stored in the table, but can I change it to linked if needed?

    Tx (hope I make sense)
    Regards,
    Rudi

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OLE? (Access 2000>)

    Yes, the pictures in the Employees and Categories tables in the Northwind database are stored in the database itself.

    Since you don't have the source files of the pictures in the Employees and Categories tables, you cannot change them to links, but when you insert a new picture, you have the option to link to the source file instead of embedding the picture in the database.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: OLE? (Access 2000>)

    Cheers <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>
    Regards,
    Rudi

Posting Permissions

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