With deference to John, I'd store the full path in a table used solely for that purpose. Then, I'd store the physical *.jpg file names in the table wherein I needed the image. Then I could concatenate the full path with the file name when I needed to display the image. I'd save each image file in the folder referenced by the full path record. This would also allow for normal backups to be run to ensure the integrity of the image files.
My reasoning is that "things change" and this includes the servers or locations of files. If the location of the saved image files changes, one need only update the single record in the full path table rather than to have to update every reference to an image file in the table in which the image file name is stored.
Thus endth my 02 cents.
Jeff
My reasoning is that "things change" and this includes the servers or locations of files. If the location of the saved image files changes, one need only update the single record in the full path table rather than to have to update every reference to an image file in the table in which the image file name is stored.
Thus endth my 02 cents.
Jeff
From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS Access Professionals" <MS_Access_Professionals@yahoogroups.com>
Sent: Saturday, July 26, 2014 7:24:19 AM
Subject: Re: [MS_AccessPros] How to get image file display on a report
--
To: "MS Access Professionals" <MS_Access_Professionals@yahoogroups.com>
Sent: Saturday, July 26, 2014 7:24:19 AM
Subject: Re: [MS_AccessPros] How to get image file display on a report
Khalid-
If all your files were .jpg, you could store the full path in the table in a text field and use an Image control to display the pictures. But you have some pdf files that the Image control won't handle. If you display the report in Report view, you can add a command button right on the report to do the display using FollowHyperLink.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Jul 26, 2014, at 2:00 AM, Khalid Tanweer khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hi All,
Hi John,
I have a report "Members CST Visa Summary" its Record Source is "Members CST Visa Summary Report Query"
Query SQL is as under:
SELECT CstVisa.MemberID, CstVisa.SurName, CstVisa.GivenName, CstVisa.GenderStatus, CstVisa.PassportNo, CstVisa.CstName, CstVisa.VisaAppliedDate, CstVisa.VisaCollectionDate, CstVisa.RefNo
FROM CstVisa
WHERE (((CstVisa.CstName)=[Forms]![Members CST Visa Summary Dialog]![cmbCstName]));
I need to display stamped visa scanned copy of any member. Is there any way to show OR open the image on a report for specified "CstName" and "MemberID".
OR should i make a form and put a command button to open the file as I am displaying members Passport copy on a form with the following code:
Private Sub cmdViewPassport_Click()
Dim strFile As String
On Error GoTo Err_cmdViewPassport_Click
strFile = CurrentProject.path & "\Passport\" _
& Me.cmbMemberID & ".pdf" 'Change this to suit
If Len(Dir(strFile)) = 0 Then
' Look for .jpg
strFile = CurrentProject.path & "\Passport\" _
& Me.cmbMemberID & ".jpg"
If Len(Dir(strFile)) = 0 Then
' Neither found - display error
MsgBox "Passport file for member ID: " & Me.cmbMemberID & " not found."
Exit Sub
End If
End If
FollowHyperlink strFile
Exit_cmdViewPassport_Click:
Exit Sub
Err_cmdViewPassport_Click:
MsgBox Err.Description
Resume Exit_cmdViewPassport_Click
End Sub
Need help and suggestions to manage it.
Best regards,
Khalid
--
---
Jeffrey Park Jones
Excel, Access, Word, Office Expert
Excel and Access, LLC®
http://ExcelAndAccess.Com
919-671-9870
5109 Deer Lake Trail
Wake Forest, NC 27587
jpjones23@centurylink.net
Jeffrey Park Jones
Excel, Access, Word, Office Expert
Excel and Access, LLC®
http://ExcelAndAccess.Com
919-671-9870
5109 Deer Lake Trail
Wake Forest, NC 27587
jpjones23@centurylink.net
__._,_.___
Posted by: jpjones23@centurylink.net
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar