# Access Question - retrieving image from URL

**URL:** https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931
**Category:** Factual Questions
**Created:** [April 13, 2010, 6:54am UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931 "2010-04-13T06:54:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![grimpixie](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@grimpixie](https://boards.straightdope.com/u/grimpixie)
#### Post date: [April 13, 2010, 6:54am UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/1 "2010-04-13T06:54:59Z")

</div>

Greetings all

I have a database which has a URL stored in a text field which points to a JPG image - is there any way to retrieve this image from the URL and have it display in a report/form?

Thanks in advance  
Grim

---

<div class="post-metadata">

### Author: ![Dahnlor](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dahnlor/32/533_2.png) [@Dahnlor](https://boards.straightdope.com/u/Dahnlor)
#### Post date: [April 13, 2010, 1:56pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/2 "2010-04-13T13:56:03Z")

</div>

Unless the image is blocked in some way, you should be able to copy the URL into a browser and open the image, then simply copy and paste it to your report.

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [April 13, 2010, 2:00pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/3 "2010-04-13T14:00:49Z")

</div>

> [@Dahnlor](#):
>
> Unless the image is blocked in some way, you should be able to copy the URL into a browser and open the image, then simply copy and paste it to your report.

That sort of defeats the purpose of having an automated report, doesn’t it?

---

<div class="post-metadata">

### Author: ![Clothahump](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@Clothahump](https://boards.straightdope.com/u/Clothahump)
#### Post date: [April 13, 2010, 3:36pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/4 "2010-04-13T15:36:18Z")

</div>

Put a picture box on the form, then set the source to the URL.

---

<div class="post-metadata">

### Author: ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)
#### Post date: [April 13, 2010, 3:47pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/5 "2010-04-13T15:47:04Z")

</div>

nevermind; failed to read the title

---

<div class="post-metadata">

### Author: ![Khendrask](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@Khendrask](https://boards.straightdope.com/u/Khendrask)
#### Post date: [April 13, 2010, 4:14pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/6 "2010-04-13T16:14:35Z")

</div>

> [@Clothahump](#):
>
> Put a picture box on the form, then set the source to the URL.

That should work, but only if you (and other users) can successfully resolve the URL, meaning it has to be on a share that everyone can read, or on an anonymously accessible web site.

---

<div class="post-metadata">

### Author: ![grimpixie](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@grimpixie](https://boards.straightdope.com/u/grimpixie)
#### Post date: [April 13, 2010, 6:29pm UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/7 "2010-04-13T18:29:08Z")

</div>

> [@Clothahump](#):
>
> Put a picture box on the form, then set the source to the URL.

The URL is different for each record in the database, how would I get it to update itself on each page of the report?

> [@Khendrask](#):
>
> That should work, but only if you (and other users) can successfully resolve the URL, meaning it has to be on a share that everyone can read, or on an anonymously accessible web site.

That’s not a problem, the images would be on our organisation website.

---

<div class="post-metadata">

### Author: ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)
#### Post date: [April 15, 2010, 12:07am UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/8 "2010-04-15T00:07:04Z")

</div>

> [@grimpixie](#):
>
> The URL is different for each record in the database, how would I get it to update itself on each page of the report?  
> That’s not a problem, the images would be on our organisation website.

Ugh. Is the URL already in the table or query you’re using as a source? Because then you’ll probably want to do this programatically. The appropriate article in the [Microsoft’s Office Help database](http://office.microsoft.com/en-us/access/HA011472041033.aspx#ConfigureTable) told me the following will work in Access 2002 or later:

[http://support.microsoft.com/default.aspx?scid=kb;en-us;285820](http://support.microsoft.com/default.aspx?scid=kb;en-us;285820)

It seems silly to me that there’s not a built in Picture control that will automatically take it’s file location data from a field.

---

<div class="post-metadata">

### Author: ![grimpixie](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@grimpixie](https://boards.straightdope.com/u/grimpixie)
#### Post date: [April 15, 2010, 10:26am UTC](https://boards.straightdope.com/t/access-question-retrieving-image-from-url/535931/9 "2010-04-15T10:26:55Z")

</div>

I found that article and was in the middle of trying to copy the code across and adapt it when I realised that we had all the appropriate images stored on our server and I’d be able to use other data they’d entered to create a file path in my query. This then proved surprisingly easy to use to change the Picture’s Control Source property when the Report Loads - problem solved!!

Lateral thinking saves the day!!

Thanks for the help everyone.  
Grim
