Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / April 2006

Tip: Looking for answers? Try searching our database.

Image Control In Report Header Or Page Header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne - 05 Apr 2006 01:56 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
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.