Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2005
    Posts
    3

    Loading pictures from URL in a report

    Hello

    I need to create a report listing products along with a picture. A table contains the URLs to the pictures, which are stored in a remote webserver.

    I have managed to load the pictures in FORMS by using the Microsoft Web Browser Control, like this:

    Private Sub Form_Current()
    wbbWebsite.Navigate URL:=[Image]
    End Sub

    It works wonders, now I need to do the same but in the detail section of a REPORT. If someone could please help, I don't know where should I put the code in the report, or even if this web browser control would be suitable to accomplish this. Please note that I need the picture to come out on print as well when I print the report.

    Any help would be greatly appreciatted, thanks

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Here's a slightly different approach.

    In the past, I have used a textbox called PictureURL, and an image control with the Picture set to a default image. I then use an OnFormat event sub to replace the default picture:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    Me!Image8.Properties("Picture") = Me!PictureURL

    End Sub

    Have you tried something like this?

  3. #3
    Join Date
    Dec 2005
    Posts
    3
    Hi Patrick, thanks for replying.

    I gave it a try but I get this error message:

    "Microsoft Office Access can't open the file http://www.xxxxxx.com/xxx.jpg"

    It seems that the picture control can't handle URLS. Do you know why this doesn't works with the Microsoft Web Browser control ?:

    Code:
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    wbbWebsite.Navigate URL:=[Image]
    End Sub
    It works fine in a form, but in a report it shows nothing.... :roll:

  4. #4
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    I must admit, I had never used that browser control before, and I was not able to get it working either. I had hoped the image control would work, and it worked fine for me in the past, but I was never using true URL's, just file paths.

    Sorry :cry:

  5. #5
    Join Date
    Dec 2005
    Posts
    3
    Have you had any experience using the Microsoft Internet Transfer control ?

    I saw a discussion somewhere else that somebody suggested downloading and saving the image locally with this Internet Transfer Control, and then use the regular picture control to display the downloaded image.

    But trying to use this control showed a weird license error on one machine, and on another the Internet Transfer Control is wasn't even listed ! so I don't know...

    :?

  6. #6
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Quote Originally Posted by drborracho
    Have you had any experience using the Microsoft Internet Transfer control ?
    I have not. I tend to stay away from controls that do not appear on the default control toolbox: it seems like every time I try to get creative with the controls, a client is not able to support it

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Repositioning pictures in the report
    By SimonJ in forum Reports
    Replies: 0
    Last Post: 09-28-2006, 03:51 PM
  2. Import/Link Pictures into a table
    By shm138 in forum Import/Export Data
    Replies: 3
    Last Post: 03-17-2006, 08:12 AM
  3. Slow Access Loading time
    By alexstoker in forum Access
    Replies: 3
    Last Post: 02-05-2006, 08:55 AM
  4. inserting bound pictures
    By inquisitive in forum Access
    Replies: 1
    Last Post: 01-09-2006, 09:59 AM
  5. Loading the form with selected record
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 07:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums