A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display a photo on a report



 
 
Thread Tools Display Modes
  #1  
Old July 28th, 2009, 07:21 AM posted to microsoft.public.access.reports
DontKnow
external usenet poster
 
Posts: 47
Default Display a photo on a report

Hi Guys,

I want to be able to display a photo (.JPG) on a report. I have all of the
Photos outside of the database to prevent excessicve bloating and to maintain
the size of the database. I currently am able to display the photo on a form
but would like to know how to do it on a report?

is there a particular method I need to utilise. ??

Please help me!

Here is the code for the forms that I have used which works beautiofully:
Set db = CurrentDb
filename = db.Name
pathname = Mid(filename, 1, Len(filename) - Len(Dir(filename)))


Dim personname As String
personname = Me.Firstname & " " & Me.Surname
personname = personname & ".JPG"
Me.Image16.Picture = pathname & personname

How would I modify this for the reports??
Cheers,



  #2  
Old July 30th, 2009, 04:51 AM posted to microsoft.public.access.reports
Sam Davis
external usenet poster
 
Posts: 23
Default Display a photo on a report

Hi,

Assuming your form code works, it should also work on a report. Use the
Print event for the relevant report section to set the Picture property of
an image control just like you have for the form.

HTH
Sam


"DontKnow" wrote in message
...
Hi Guys,

I want to be able to display a photo (.JPG) on a report. I have all of
the
Photos outside of the database to prevent excessicve bloating and to
maintain
the size of the database. I currently am able to display the photo on a
form
but would like to know how to do it on a report?

is there a particular method I need to utilise. ??

Please help me!

Here is the code for the forms that I have used which works beautiofully:
Set db = CurrentDb
filename = db.Name
pathname = Mid(filename, 1, Len(filename) - Len(Dir(filename)))


Dim personname As String
personname = Me.Firstname & " " & Me.Surname
personname = personname & ".JPG"
Me.Image16.Picture = pathname & personname

How would I modify this for the reports??
Cheers,





  #3  
Old July 30th, 2009, 05:51 AM posted to microsoft.public.access.reports
DontKnow
external usenet poster
 
Posts: 47
Default Display a photo on a report

Thanks Sam!!

Works like a bought one!!

Cheers,

The key to the success was utilising the "Print event"

Cheers,

"Sam Davis" wrote:

Hi,

Assuming your form code works, it should also work on a report. Use the
Print event for the relevant report section to set the Picture property of
an image control just like you have for the form.

HTH
Sam


"DontKnow" wrote in message
...
Hi Guys,

I want to be able to display a photo (.JPG) on a report. I have all of
the
Photos outside of the database to prevent excessicve bloating and to
maintain
the size of the database. I currently am able to display the photo on a
form
but would like to know how to do it on a report?

is there a particular method I need to utilise. ??

Please help me!

Here is the code for the forms that I have used which works beautiofully:
Set db = CurrentDb
filename = db.Name
pathname = Mid(filename, 1, Len(filename) - Len(Dir(filename)))


Dim personname As String
personname = Me.Firstname & " " & Me.Surname
personname = personname & ".JPG"
Me.Image16.Picture = pathname & personname

How would I modify this for the reports??
Cheers,






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.