Question : View PDF within an Access 2007 Form?

I have an Access 2007 application that connects to a back end SQL Server database on a remote server.  The user opens my app, which authenticates him and then connects to the SQL database.  The server upon which the database is located is not mappable by the user.  He cannot see the server; he can only use the app to access the data.

I want to store some PDF files either inside the SQL Server DB or in a folder on the server.  The user will arrive at an Access form inside the app where he will select a PDF file.  I want to open it within the form.  I do not want to open it with a "Follow Hyperlink" (actually, given the non-mappable aspect of the server, I do not think I can), and I do not want to download it to his desktop.

It does not need to show up in 100% scale because the intent is not to read every word of the PDF document, but rather to be able to show collections of pages, maybe 2 at a time.  The detailed text might not be readable, but the Headers and larger elements will be discernable, sort of like large thumbnails.  The point is to allow the user to view it from a sort of style and layout aspect...  "Do you like style A or style B?"  

I know (or at least I think) I could take screen shots of every page of a PDF, store them in fields and then display them within Access.  But I would rather not have to do that work.  I would rather be able to display the layout of the PDF dynamically.

How might I do this?

Answer : View PDF within an Access 2007 Form?

Either use a pdf ActiveX control or  the Web Browser control.

Here's some sample code for the Web Browser controlbecause it isn't apparent how to use the navigate method:

 Private Sub cmdNavigate_Click()
If Not IsNull(Me.txtURL) Then
With Me.ActiveXCtl0
.Navigate Me.txtURL
End With
End If
End Sub

 cmdNavigate is a button which is using the path in txtURL as a hyperlink
substitute. If you put the full path to the pdf file in txtURL it will open
it within the Access form's IE control.

Random Solutions  
 
programming4us programming4us