Sabtu, 26 Juli 2014

Re: [MS_AccessPros] How to get image file display on a report

 

John,

Thank you for your reply, we are now on vacations up to 31st July. In the meanwhile i'll work on your suggestions.

Khalid


On Saturday, July 26, 2014 4:24 PM, "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
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

 



__._,_.___

Posted by: Khalid Tanweer <khalidtanweerburrah@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Yahoo Groups
Did you Know?
Dealing with inactive moderators or owners


.

__,_._,___

Tidak ada komentar:

Posting Komentar