Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Link to images (2000)

    I have a table with three fields: (ProductID, Product, ProductDescription). Product contains a product name. Each product has a similarily name image file in path droductimages. ( i.e. Product 1152B has a corresponding image droductimages1152b.jpg). Is it possible to programmatically link the two? I have done this when the path was avaible in a field but it isn't in this case. If anyone has any ideas I would appreciate it. Thanks. - scott

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

    Re: Link to images (2000)

    If you want to display the image on a form, you can use the same technique as when the full path is in a field, the only difference being that you must assemble the path in code. Is that what you want, or do you mean something else by 'link the two'?

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Link to images (2000)

    Thank you. Yes, that is what I'm trying to do. I'm not sure how to assemble the path via code. - Scott

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

    Re: Link to images (2000)

    Say that your image control is named imgPic. You could set the Picture property of this control as follows:

    Me.imgPic.Picture = "D:ProductImages" & Me.ProductID & ".jpg"

    I have assumed that the '1152B' you mentioned is a ProductID; if it is a value of Product, replace ProductID by Product in the above expression.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Link to images (2000)

    That did it. Once again, that you very much for your help. -scott

Posting Permissions

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