Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a web Image in a report access, code issues ... 1

Status
Not open for further replies.

creafter

Technical User
Jul 5, 2018
13
CH
Hello,

I try to apply the great Strongm code to display a web image in a report but have some issue when I try to "print" the report.

So the link where I found the solution is :
When I try to execute the code I obtain this error message from VBA : "compilation error, bad use of the property" with the '.picture' which is in highlighted

Code:
Option Compare Database

Public Sub Détail_Format(Cancel As Integer, FormatCount As Integer)
Set Image0.Picture = LoadPictureFromURL("[URL unfurl="true"]http://....jpg")[/URL]    'Source file - this text could obviously come from a field in a table, for example
End Sub
where Image0 is an image object in the detail part of the report

I really don't know why this error appear and i don't know how to solve it...
Do you have some idea ?


nb : Excuse my english, it's not my native language

Creafter
 
Ok :) I will try it tomorrow at work.

strongm said:
you might as well set it at design time
I don't understand what you mean by "design time"... you want to say when I create the OLE and when I size it ?
 
I have a large amout of picture and they don't have the same size so I can't design an unique size form my OLE image.

I have try the property and it work perfectly, my project is now done.
Thank you a lot for all your help !
[thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top