Hi All,
Here is my scenario.. I have created a form bound to a query and added a list box to go to the record when i highlight it from the list.
Each record has a hyperlink to a pdf document [Hyperlink] and i would like to show a preview of this document when i click on the corresponding record in the list box.
I have inserted ActiveX Control "Microsoft Web Browser" to the form and added the following code.
Private Sub WebBrowser0_GotFocus()
Me.WebBrowser0.Navigate [Hyperlink]
End Sub
Private Sub WebBrowser0_LostFocus()
Me.WebBrowser0.Navigate "about:blank"
End Sub
My issue is when i click on the control to get focus i am presented with the error: "The URL associated with this PDF document is malformed and may not display properly" i then click OK and it opens the PDF in the window.
All i can think of is that the full url path contains spaces but i dont know how to compensate for this in the code. Any help would be much appreciated
Here is my scenario.. I have created a form bound to a query and added a list box to go to the record when i highlight it from the list.
Each record has a hyperlink to a pdf document [Hyperlink] and i would like to show a preview of this document when i click on the corresponding record in the list box.
I have inserted ActiveX Control "Microsoft Web Browser" to the form and added the following code.
Private Sub WebBrowser0_GotFocus()
Me.WebBrowser0.Navigate [Hyperlink]
End Sub
Private Sub WebBrowser0_LostFocus()
Me.WebBrowser0.Navigate "about:blank"
End Sub
My issue is when i click on the control to get focus i am presented with the error: "The URL associated with this PDF document is malformed and may not display properly" i then click OK and it opens the PDF in the window.
All i can think of is that the full url path contains spaces but i dont know how to compensate for this in the code. Any help would be much appreciated