Sabtu, 26 Juli 2014

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

 

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 (1)

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


.

__,_._,___

Tidak ada komentar:

Posting Komentar