Linked Object property

P

Pete.C

I am trying to link a .pdf file to a form where the pdf file name is relative to a filed name on the form. The simplke solution seems to be to pass the file name into the 'Source Doc' property of the linked object, but it doesn't seem to want to accept it.

Any suggestions on how to overcome this please?
 
J

John Nurick

Hi Pete,

In general it's best not to store documents in OLE fields (linked or
otherwise). Instead, leave the PDF files in their folders, and just
store their names and locations in the database. When you want to open
one, you can do it with a button on the form and something like this in
its Click event procedure, where txtPath and txtFileName are textboxes
on the form containing the directory and name of the file:

Dim strFileSpec As String

strFileSpec = Me.txtPath.Value & "\" & Me.txtFileName.Value
Application.FollowHyperlink strFileSpec


I am trying to link a .pdf file to a form where the
pdf file name is relative to a filed name on the form. The simplke
solution seems to be to pass the file name into the 'Source Doc'
property of the linked object, but it doesn't seem to want to accept it.
 

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