?
Solved

Display Hyperlink's photo in Report view

Posted on 2011-03-22
10
Medium Priority
?
660 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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
 

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 85
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 93

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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