?
Solved

Display Hyperlink's photo in Report view

Posted on 2011-03-22
10
Medium Priority
?
680 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

650 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