I don't believe it's possible to display the PDF within a form anymore: it's
been years since Adobe supported the ActiveX control to display PDFs.
To open the file in Acrobat Reader (or whatever program has been associated
with the PDF extension on the user's machine), use
Application.FollowHyperlink strImagePath
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Chez" <(E-Mail Removed)> wrote in message
news:563B6358-2185-433E-B9A2-(E-Mail Removed)...
>I have PDF files saved on our server that relate to each record in my
> database. I'm trying to create a command button that will create a path
> to
> these files and do one of two things.
>
> 1. Create the path and open the PDF file in Acrobat Reader.
> OR
> 2. Create the path and display a particular PDF file within a Form.
>
> I'd prefer to do option #2. I can currently do option #2 with an image
> using the following code below.
>
> Dim strImagePath As String
> Dim strMDBPath As String
> Dim intSlashLoc As String
>
> On Error Resume Next
> strMDBPath = CurrentProject.FullName
>
> intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
>
> strImagePath = Left(strMDBPath, intSlashLoc) & _
> Me.txtImageName
>
> Me.imageframe.Picture = strImagePath
>
> PLEASE HELP
>