Run-time error '2220'

WCI2017

New member
Local time
Today, 11:54
Joined
Feb 28, 2017
Messages
9
Hello,
I'm trying to create a form that includes an image using a URL. I have tried many examples found on these forums but i keep receiving the following error message:

Run-time error "2220":
Microsoft Access can't open the file
'htp://dmdview.......blahblahblah.....'

i have been given URLs and hyperlinks of these pictures that are located on an external server and need them to appear on my forms as I toggle thru each entry (over 40,000). I can see the photo if i copy and past the URL into EI, but the form Image continues to remain blank. Can someone help me please?
thanks! :confused:
 
Thank you! The error message disappeared... but I still can't get the images to appear on the form. Any tips on that part?

This is the code i have in the form, is there anything I need to revise? In thread you sent, I'm not sure what this part means in BOLD
Picturefile = "\\C:\images\jpgs" & Me.cboPRODUCT_CODE.Column(0) & ".jpg"
so I deleted it, could that be my problem?

Private Sub Form_Current()

Dim PictureFile As String
PictureFile = "ImagePath" & ".jpg"
If Len(Dir(PictureFile)) > 1 Then
Me.RampImage.Picture = PictureFile
Else
Me.RampImage.Picture = ""
End If

End Sub
 
I am not sure of how your tables are set up, but here is how I do it.

I have a master table that holds all the info for my units. There is a PK field that is an autonumber. Because I decided to dress up my forms with their logo AFTER the tables are built, I decided to make a different table that held their logo.

The "logo table", named tblUnitLogo is rather simple; one UnitID field that is a Long Number and an attachment field. The UnitID field corresponds to the Units PK field. The attachment field holds only one file which is the units logo. Most are jpgs but there are some other formats.

On the form, I simply put that field where I want it and all is well. One thing to note is to make sure the Display As property is "Image/Icon". Other than that, it is pretty straight-forward.

Give it a shot or if this will not work, give some details on your set-up and we will see it we cant get you spruced up.
 
After playing with the form for a few days, all I needed was the Web Browser Control!!! Thank you for all the tips!
 
You're welcome I guess...? Glad you got it sorted out!
 

Users who are viewing this thread

Back
Top Bottom