Solved

Display Hyperlink's photo in Report view

Posted on 2011-03-22
10
614 Views
Last Modified: 2013-11-28
Hi,

I recently developed a databse showing staff's personal details..... including recent photos.... At early beginning, I employed "ATTACHMENT" to attach the photo...... but problem comes out.....  the database become unstable and unable to show the photo even the photo size is very very small.

After reading articles, I believe using hyperlink to store the photo should be the best way.   I have made a additional hyperlink to store the photo link.  But I find I cannot display the photo in both "FORM" and "REPORT" view.   It shows the link only.

The link is "Site Pass Photo\2011 03\2011 03 22\201103222242.bmp"  

Could you please helping me to solve my question?

Thanks a lot in advance.

Jack
0
Comment
Question by:jack_lai
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35189043
You shouldn't use a Hyperlink field to store the path, but instead use a standard Text or Memo field. If you do this, you can then use an Image control to show your picture. Just add code like this in the Current event of the Form or the Format or Print event of the relevant section of your report:

Me.YourImageControl.Picture = Me.YourTableField
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35189395
What LSM posted is the standard way of doing this.

But I just have a few questions:
<At early beginning, I employed "ATTACHMENT" to attach the photo>
Do you mean the Access 2007 "attachment" datatype?
If so then this should display the image just fine in the form as well as in the Report.

<but problem comes out.....  the database become unstable and unable to show the photo>
Define "Unstable" please...

Again, if you are using the Access 2007 Attachment datatype field to store the image, no work should be required, the image will display automatically in the form or the report. (if you create them using all of the fields)

Finally:
<The link is "Site Pass Photo\2011 03\2011 03 22\201103222242.bmp"  >
...is that the full path?
It should be something like:
"C:\Site Pass Photo\2011 03\2011 03 22\201103222242.bmp"


JeffCoachman

 
0
 

Author Comment

by:jack_lai
ID: 35189657
thz for your quick response.

I employed "Attachment" in access 2007 version.  Everything is fine before 280 entries.  

However, today,   some of the photos after 2xx didnt show up correctly in "Print Preview" , the photo is correct  in "Layout" view, but once I click print preview...   The size of the database is now about 20MB only....  

I did use adobe acrobat standard to create a pdf file.....  but the problem cant be solved.....

therefore, i am looking for another way to store the photo.





0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35190788
<I employed "Attachment" in access 2007 version>
Again, ...do you mean the "Attachment" datatype in Access 2007?
Please respond Yes or No...

You are now stating that you: "use adobe acrobat standard to create a pdf file."
Your originally stated that these were .bmp  image files?

Can you please clarify the exact nature of these "Images" please?
(bmp images, pdfs, ...or both...)


In any event, I have heard of this issue before, it seems to have to do with the resources used to fully render the report (and all the attached documents)... in attachment data-type fields, when the report is viewed in Print Preview.

Again, the most common solution is what LSM posted.

JeffCoachman
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:jack_lai
ID: 35190909
yes, it is attachment datatype in access 2007

when i found the problem, i print the report using "pdf printer" to find out whether it is the problem of printer memory.......... finally, the pdf file created still have missing photo...

For LSM's answer, please elaborate as I did only understand use Access's function and create simple query ........  

I am a amateur of Access

thz


0
 

Author Comment

by:jack_lai
ID: 35190921
ps. The picture is in jpeg format
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35192112

I'll let LSM elaborate on his code snippet
0
 
LVL 84
ID: 35195311
I'm not sure what else I can do to elaborate. You place an Image control on your Report. Let's assume you're placing that in the Detail section. If so, then you would use the Format or Print event of the Detail section and put your code there.

You would obviously have to use the names of the objects in your database instead of the generic values I've used, but otherwise it's fairly straightforward.

Are you not sure how to put the code in the Event?
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 36157639
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now