From: jocasio via AccessMonster.com on
I need help getting a .pdf file to show in a report.

I've used the following code for .jpg files, but have no idea what control or
how to preview .pdf files.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim sFileName As String
sFileName = Me.ImageTxt

See if this photo exists
Returns a zero length string if file does not exist
sFileName = Dir(sFileName)

If Len(sFileName & vbNullString) = 0 Then
Load "Not Available" Photo
Me.loglinkview.Picture = "F:\NotAvailable.BMP"
Else
Load the matching Photo for this StudentID
Me.loglinkview.Picture = Me.ImageTxt

End If
End Sub

--
Yuli O

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201005/1