bound Image Control dos not show image on a report.

Hi,
On my app I have a report than needs to show images from external files. To do so, I have populated the report with 3 bound image controls, for 3 images, and , to make sure that everything was alright, I provided, in the "On format" event, code to make sure that the links were properly set:

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

Dim strPathNormal, _
    strPathAcidoAcetico, _
    strShiller As String
    
    strPathNormal = Me.x_normalP
    strPathAcidoAcetico = Me.x_AEP
    strShiller = Me.x_sp
    
    Me.rpt_ImgNormal.Picture = strPathNormal
    Me.rpt_imgAcidoAcetico.Picture = strPathAcidoAcetico
    Me.rpt_imgShiller.Picture = strShiller
    
    
End Sub

Open in new window


The I did put a breakpoint and observed the link contents and they were alright.

However, the images are totally blanl.
Can anyone help?
João serras-pereiraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
I guess it will (would) display the same picture for all records, as the controls are unbound.

So, you may have to use the other method and retrieve three paths in the source query.
Then bind each image control to one of these, say:

PathNormal
PathAcidoAcetico
PathShiller

Open in new window

0
João serras-pereiraAuthor Commented:
Hi
Well... the controls are bound... I believe that the error lies on invoking the report

I do invoke using:

DoCmd.OpenReport "rptExameSimples", acViewPreview, "idExame =" & Me.frm_idExame

and the, I debug.print, and get several records instead od a single record
 would you reccoment a better filer?
0
Gustav BrockCIOCommented:
But if they already are bound, they should display a picture - and there should be no reason to set the Picture property.
Besides, if I recall correctly, such a setting will be ignored when the control is bound.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
João serras-pereiraAuthor Commented:
Hi Gustav -
Found (I think) the issue, thanks to your last message.
I was using  the OLE control, not the image control; replaced it and it works.  But I am kept thinking: why  the OLE control does not work?
kindest regards
/joao
0
Gustav BrockCIOCommented:
Oh, that explains.
The OLE control is a very different animal.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.