I have an image control in a report's detail section that gets its
image from an invisible bound textbox (PhotoFile) on the report. The
following code is placed in the report's Detail_Format event.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.PhotoFile
End Sub
I can't get this to work if I place the image control in the report
header or page header and then try to use the ReportHeader_Format or
PageHeader_Format event to populate the image control.
I've read some posts that seem to suggest that this can't be done. Does
anyone know how to do this?
Any help appreciated.
Br@dley - 05 Apr 2006 11:32 GMT
> I have an image control in a report's detail section that gets its
> image from an invisible bound textbox (PhotoFile) on the report. The
[quoted text clipped - 12 lines]
>
> Any help appreciated.
I use:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
If Len(Me![Photo]) > 0 Then
If Len(Dir(Me![Photo])) > 0 Then
Me![Pic].Picture = Me![Photo]
Else
Me![Pic].Picture = ""
Cancel = True
End If
Else
Me![Pic].Picture = ""
Cancel = True
End If
End Sub
The only thing I can think of is that I had to have the image control set to
an image statically in design view so in effect I'm changing the existing
image source at runtime.

Signature
regards,
Br@dley