Format inside Hyperlink field

mike p

New member
Local time
Today, 13:45
Joined
Apr 1, 2011
Messages
8
When auto filing a hyperlinked document -

My code is working from a network drive but not my own.

Addresses to seem to be "shortcutting" a portion of the address I need.
Of course i would like this to function from both network drives and a persons local.

Instead of C:\Temp\temp.pdf
My current links reads ..\temp.pdf

any help is appreciated.

here is my code:

Dim Doc_Name As String
Dim PartNmber As String
Dim ChangeRequestNumber As String
'Dim Dte As String
Dim Hyper_MIR1 As String


PartNmber = Forms![Change Request Form]![Part #]
ChangeRequestNumber = Forms![Change Request Form]![Change request #]

Hyper_MIR1 = HyperlinkPart(Forms![Change Request Form]![MIR1], acAddress)
Doc_Name = PartNmber & "MIR" & ChangeRequestNumber & ".pdf"

Name Hyper_MIR1 As G:\Data\Access Databases\Change_Request_Database\File_storage\" & Doc_Name
 
Mike,

Have you tried using

Application.FollowHyperlink siteToFind

using your data (untested, just typed in )

Doc_Name = PartNmber & "MIR" & ChangeRequestNumber & ".pdf"
mDir = "G:\Data\Access Databases\Change_Request_Database\File_storage\"

mDir = mDir & Doc_name

Application.FollowHyperlink mDir

I think this will find and open your pdf.

Good luck.
 
That part is doing what i want.

Ihe person using the database wants to drop a file he has prepared onto the link (from wherever it is usualy his own drive) and the file will recieve a unique name then be saved into a predetermined location (g drive...).

It is just giving me a file not found alarm when it's on my local even though the file is there. works on the network.
 
In other words if i can get it to quit truncating my local address as i drop the hyperlink into its field i got it whooped.:)
 

Users who are viewing this thread

Back
Top Bottom