Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2003
    Posts
    6

    Unhappy Unanswered: Insert a picture in Form

    Hi! I'm working with a telephone list at work and I would like to insert link to pictures in the Form. When someone search for the Logistic manager, they should get detailed information, also a picture of the person.

    How can I write this in Access 97?

    The picture will change after which person you search (activate).

    Hope someone knows/will help!

    Håvar, Norway.

  2. #2
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71

    Re: Insert a picture in Form

    Do you have the Northwind Sample Database, because this has an example of what i think you are describing. Try taking a look at that.
    em.xx



    Originally posted by hkvalbei
    Hi! I'm working with a telephone list at work and I would like to insert link to pictures in the Form. When someone search for the Logistic manager, they should get detailed information, also a picture of the person.

    How can I write this in Access 97?

    The picture will change after which person you search (activate).

    Hope someone knows/will help!

    Håvar, Norway.

  3. #3
    Join Date
    Mar 2003
    Posts
    6

    Re: Insert a picture in Form

    Hi!

    Thanks for quick reply!

    I don't have the samples... IKEA is installing clients and the samples is taken away when installing.

    Br

    Håvar

  4. #4
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71

    Re: Insert a picture in Form

    Ahh. I only have the xp version, so i can't send it to you either. I'll have a look at the example and get back to you.
    I think you have to save the pic as an OLE Object in the table and then you can call it up in a pic box. But it's been a while since I've done anything like that.



    Originally posted by hkvalbei
    Hi!

    Thanks for quick reply!

    I don't have the samples... IKEA is installing clients and the samples is taken away when installing.

    Br

    Håvar

  5. #5
    Join Date
    Mar 2003
    Posts
    6

    Re: Insert a picture in Form

    Hi!

    Thanx for all help!!!

    Br

    Håvar

    Have a nice WEEKEND!!!

  6. #6
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71

    Re: Insert a picture in Form

    Yes, I was right.
    If you go into the table you want to assign the picture to (i'm guessing it will be your employees table or something) and create a new field. In the data type select OLE object.
    To add the pictue to the tableright click and select insert object. then you can either create a new picture or click creat from file and then you can browse to find the image you want.
    Then if you put a picture box on the form, you can set it's data source as the attribute of that table.

    hope that helps. em.xx



    Originally posted by hkvalbei
    Hi!

    Thanx for all help!!!

    Br

    Håvar

    Have a nice WEEKEND!!!

  7. #7
    Join Date
    Jan 2003
    Posts
    46
    Havar,

    Sorry my keyboard doesn't do nice Norwegian characters. But hold up.

    You don't want to store the images in a table. First, I believe Access will only accept images in a bitmap format. Second, Access stores images in a very inefficient manner.

    What you should do is link the image view control to the image. Then just store the image name in a table, or the image name and the path. The following code may help demonstrate what to do (it is from the form's On Current event):

    Dim strPathThumbnail as string
    Dim strThumbnail as string

    'variable equal to imageID from current record
    strThumbnail = Me.txtImageID

    'concatenate paths to images corresponding to ImageID
    strPathThumbnail = "c:\Documents and Settings\All Users\My Documents\Photos\PhotosScanned\" & strThumbnail & ".tif"

    'determines if path is valid (returns true)
    ValidPathThumbnail = Len(Dir$(strPathThumbnail, vbNormal)) > 0

    If ValidPathThumbnail = False Then
    'use blank or dummy image
    Me.imgThumbnail.DataField = "C:\Documents and Settings\All Users\My Documents\Photos\PhotosScanned\blank.bmp"
    Else
    Me.imgThumbnail.DataField = strPathThumbnail
    End If


    Cheers,
    Zambezibill

  8. #8
    Join Date
    Aug 2012
    Posts
    19
    I have Northwind.mdb but I could not find the path of the photos of Employees there as well Category

Posting Permissions

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