PDF help

  • Thread starter lda via AccessMonster.com
  • Start date
L

lda via AccessMonster.com

Hello,
i have a many images and pdf documents on company server, that will be
attached to different reports.
I am currently using the following in a sub report to link images stored in a
table in access

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me!txtImageNote = DisplayImage(Me.imageduke, Me.txtimagename)
End Sub

and

Public Function DisplayImage(ctlImageControl As Control, strImagePath As
Variant) As String
On Error GoTo Err_DisplayImage

Dim strResult As String
Dim strDatabasePath As String
Dim intSlashLocation As Integer

With ctlImageControl
If IsNull(strImagePath) Then
.Visible = False
strResult = "No image name specified."
Else
If InStr(1, strImagePath, "\") = 0 Then
' Path is relative
strDatabasePath = CurrentProject.FullName
intSlashLocation = InStrRev(strDatabasePath, "\", Len
(strDatabasePath))
strDatabasePath = Left(strDatabasePath, intSlashLocation)
strImagePath = strDatabasePath & strImagePath
End If
.Visible = True
.Picture = strImagePath
strResult = "Image found and displayed."
End If
End With

I will like to also link pdfs howeber am not able to.. Do you have any
suggestions.

Also,
I am thinking about merging the location of the images and pdf documents to
that I will only have one sub report that pulls everything associated with a
particular id. Is this possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top