Link to home
Start Free TrialLog in
Avatar of João serras-pereira
João serras-pereiraFlag for Portugal

asked on

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?
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

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

Avatar of João serras-pereira

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Oh, that explains.
The OLE control is a very different animal.